import { useForm } from 'react-hook-form' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' interface Props { onSubmit: (data: Record) => void loading?: boolean } export function BlockedDateForm({ onSubmit, loading }: Props) { const { register, handleSubmit } = useForm({ defaultValues: { startDate: '', endDate: '', reason: '' }, }) function handleFormSubmit(data: { startDate: string; endDate: string; reason: string }) { onSubmit({ startDate: data.startDate, endDate: data.endDate, reason: data.reason || undefined, }) } return (
) }