import { CalendarPlus, Download, CalendarClock } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { downloadICS, googleCalendarUrl, type CalendarEventInput, } from '@/lib/calendar'; import { cn } from '@/lib/utils'; import { useTranslation } from '@/contexts/language'; interface AddToCalendarProps { event: CalendarEventInput; /** Accent color for the button (category color). */ color?: string; className?: string; } /** * Small button that lets attendees drop a tour into their calendar of choice. * Offers a native .ics download (Apple/Outlook) and a Google Calendar link. */ export function AddToCalendar({ event, color = '#06b6d4', className }: AddToCalendarProps) { const { t } = useTranslation(); return ( downloadICS(event)} className="cursor-pointer" > {t('placesUi.addToCalendar.appleOutlook')} {t('placesUi.addToCalendar.google')} ); }