import { Calendar, Clock } from "lucide-react"; import type { ReactNode } from "react"; import dayjs from "@calcom/dayjs"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Badge, Dialog, DialogContent } from "@calcom/ui"; import { useTimePreferences } from "../../../lib"; import { useBookerStore } from "../../store"; import { useEvent } from "../../utils/event"; const BookEventFormWrapper = ({ children }: { onCancel: () => void; children: ReactNode }) => { const { t } = useLocale(); const selectedTimeslot = useBookerStore((state) => state.selectedTimeslot); const selectedDuration = useBookerStore((state) => state.selectedDuration); const { data } = useEvent(); const parsedSelectedTimeslot = dayjs(selectedTimeslot); const { timeFormat, timezone } = useTimePreferences(); if (!selectedTimeslot) { return null; } return ( <>