import type { AdminBooking, Court } from '@repo/api-contract';

export type BookingViewMode = 'panel' | 'status' | 'list' | 'recurring';
export type BookingStatusFilter = 'all' | 'free' | 'reserved';
export type BookingSegmentStatus = 'free' | 'reserved';

export interface BookingTimeRange {
  start: string;
  end: string;
}

export interface BookingSummary {
  totalReservations: number;
  freeSlots: number;
  reservedSlots: number;
  freePercent: number;
  reservedPercent: number;
}

export interface BookingCourtMetrics {
  free: number;
  reserved: number;
}

export interface BookingTimelineSegment {
  id: string;
  courtId: string;
  status: BookingSegmentStatus;
  startTime: string;
  endTime: string;
  startMinutes: number;
  endMinutes: number;
  booking?: AdminBooking;
}

export interface BookingCourtSchedule {
  court: Court;
  segments: BookingTimelineSegment[];
  metrics: BookingCourtMetrics;
}

export interface BookingSlotDraft {
  courtId?: string;
  date: string;
  startTime?: string;
  sportId?: string;
}
