import Link from "next/link"; import { Fragment } from "react"; import { availabilityAsString } from "@calcom/lib/availability"; import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Availability } from "@calcom/prisma/client"; import { RouterOutputs } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react"; import { Schedule } from "@calcom/types/schedule"; import { Badge, Button, Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Icon, } from "@calcom/ui"; export function ScheduleListItem({ schedule, deleteFunction, displayOptions, updateDefault, }: { schedule: RouterOutputs["viewer"]["availability"]["list"]["schedules"][number]; deleteFunction: ({ scheduleId }: { scheduleId: number }) => void; displayOptions?: { timeZone?: string; hour12?: boolean; }; updateDefault: ({ scheduleId, isDefault }: { scheduleId: number; isDefault: boolean }) => void; }) { const { t, i18n } = useLocale(); const { data, isLoading } = trpc.viewer.availability.schedule.get.useQuery({ scheduleId: schedule.id }); return (