'use client'; import { usePushWithData } from '@/hooks/url'; import { CalendarPlus } from 'lucide-react'; type BookButtonProps = { clientId?: string; disabled?: boolean; label: string; masterId: string; onBooked?: () => void; }; export function BookButton({ clientId, disabled, label, masterId, onBooked, }: Readonly) { const push = usePushWithData(); const handleBook = () => { push('/orders/add', { ...(clientId && { client: { documentId: clientId } }), slot: { master: { documentId: masterId } }, }); onBooked?.(); }; if (!masterId && !clientId) return null; return (
); }