import { Calendar, Fuel, RefreshCw, Truck } from 'lucide-react'; import type { CustomerType, DateQuickPick } from '../types'; import { QUICK_PICK_OPTIONS, type RangeMode } from './model'; interface DailyRangeControlsProps { pick: RangeMode; dateRange: { start: string; end: string }; customer: CustomerType; stations?: { id: number; name: string }[]; selectedStationId?: number | null; updatedAt?: string | null; loading?: boolean; onQuickPick: (pick: DateQuickPick) => void; onCustomPick: () => void; onDateRangeChange: (field: 'start' | 'end', value: string) => void; onCustomerChange: (customer: CustomerType) => void; onStationChange?: (stationId: number | null) => void; onRefresh?: () => void; } export default function DailyRangeControls({ pick, dateRange, customer, stations = [], selectedStationId = null, updatedAt, loading = false, onQuickPick, onCustomPick, onDateRangeChange, onCustomerChange, onStationChange, onRefresh, }: DailyRangeControlsProps) { return (
{QUICK_PICK_OPTIONS.map(option => ( ))}
onDateRangeChange('start', value)} /> onDateRangeChange('end', value)} /> {onStationChange ? ( ) : null}
{(['lingniu', 'external'] as const).map(option => ( ))}
{updatedAt ? {updatedAt} : null} {onRefresh ? ( ) : null}
); } function DateField({ label, value, onChange }: { label: string; value: string; onChange: (value: string) => void }) { return ( ); }