import { Link } from '@tanstack/react-router' import { usePOSStore } from '@/stores/pos.store' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' import { ArrowLeft, Lock, DollarSign, Receipt, FileText } from 'lucide-react' import type { DrawerSession } from '@/api/pos' import { useState } from 'react' import { POSDrawerDialog } from './pos-drawer-dialog' interface POSTopBarProps { locations: { id: string; name: string }[] locationId: string | null onLocationChange: (id: string) => void drawer: DrawerSession | null } export function POSTopBar({ locations, locationId, onLocationChange, drawer }: POSTopBarProps) { const cashier = usePOSStore((s) => s.cashier) const lockFn = usePOSStore((s) => s.lock) const receiptFormat = usePOSStore((s) => s.receiptFormat) const setReceiptFormat = usePOSStore((s) => s.setReceiptFormat) const [drawerDialogOpen, setDrawerDialogOpen] = useState(false) const drawerOpen = drawer?.status === 'open' const isThermal = receiptFormat === 'thermal' return ( <>