// Calendar component types
export interface Event {
  id: string;
  title: string;
  start_time: string;
  venue: string;
  slug: string;
  category?: string;
  is_featured?: boolean;
  image_url?: string;
  distanceMiles?: number;
  popularityScore?: number;
  description?: string;
}

export interface TrendingEvent {
  eventId: string;
  title: string;
  venue: string;
  startTime: string;
  distanceMiles?: number;
  popularityScore?: number;
  ticketsSold?: number;
  isFeature?: boolean;
}

export interface UserLocation {
  lat: number;
  lng: number;
  city?: string;
  state?: string;
  country?: string;
  source?: 'gps' | 'ip';
}

export type CalendarView = 'month' | 'week' | 'list';

export interface CalendarProps {
  events: Event[];
  onEventClick?: (event: Event) => void;
  showLocationFeatures?: boolean;
  showTrending?: boolean;
  initialView?: CalendarView;
  className?: string;
}

export interface CalendarHeaderProps {
  currentDate: Date;
  view: CalendarView;
  onViewChange: (view: CalendarView) => void;
  onPreviousMonth: () => void;
  onNextMonth: () => void;
  onToday: () => void;
  isMobile: boolean;
}

export interface CalendarGridProps {
  currentDate: Date;
  events: Event[];
  onEventClick?: (event: Event) => void;
  isMobile: boolean;
}

export interface EventCardProps {
  event: Event;
  onClick?: (event: Event) => void;
  variant?: 'grid' | 'list' | 'trending';
  showDistance?: boolean;
  className?: string;
}

export interface EventListProps {
  events: Event[];
  onEventClick?: (event: Event) => void;
  showDistance?: boolean;
}

export interface TrendingEventsProps {
  events: TrendingEvent[];
  userLocation?: UserLocation;
  onEventClick?: (event: TrendingEvent) => void;
  title?: string;
  radius?: number;
}

export interface CalendarDay {
  day: number;
  isCurrentMonth: boolean;
  isToday: boolean;
  date: Date;
  events: Event[];
}

export interface CalendarState {
  currentDate: Date;
  view: CalendarView;
  events: Event[];
  filteredEvents: Event[];
  trendingEvents: TrendingEvent[];
  nearbyEvents: TrendingEvent[];
  userLocation: UserLocation | null;
  isLoading: boolean;
  isMobile: boolean;
}

export interface UseCalendarOptions {
  initialView?: CalendarView;
  showLocationFeatures?: boolean;
  showTrending?: boolean;
  events?: Event[];
}

export interface UseCalendarReturn extends CalendarState {
  setCurrentDate: (date: Date) => void;
  setView: (view: CalendarView) => void;
  previousMonth: () => void;
  nextMonth: () => void;
  goToToday: () => void;
  loadLocationAndTrending: () => Promise<void>;
}