import { Dialog, DialogContent, DialogHeader, DialogTitle, } from "@/components/ui/dialog";
import { AppointmentForm } from "./appointment-form";
export function AddAppointmentModal({ open, onOpenChange, onSubmit, onDelete, isLoading, appointment, prefillData, }) {
    return (<Dialog open={open} onOpenChange={onOpenChange}>
      <DialogContent className="max-w-md">
        <DialogHeader>
          <DialogTitle>
            {appointment ? "Edit Appointment" : "Add New Appointment"}
          </DialogTitle>
        </DialogHeader>
        <div className="p-1">
          <AppointmentForm appointment={appointment} prefillData={prefillData} onSubmit={(data) => {
            onSubmit(data);
            onOpenChange(false);
        }} isLoading={isLoading} onDelete={onDelete} onOpenChange={onOpenChange}/>
        </div>
      </DialogContent>
    </Dialog>);
}
