/**
 * TypeScript interfaces for VIP Coordinator
 */

export interface VIP {
  id: string;
  name: string;
  organization?: string;
  department: 'OFFICE_OF_DEVELOPMENT' | 'ADMIN';
  arrivalMode: 'FLIGHT' | 'SELF_DRIVING';
  expectedArrival?: string;
  airportPickup: boolean;
  venueTransport: boolean;
  notes?: string;
  createdAt: string;
  updatedAt: string;
  deletedAt?: string;
}

export interface Driver {
  id: string;
  name: string;
  phone: string;
  department?: 'OFFICE_OF_DEVELOPMENT' | 'ADMIN';
  userId?: string;
  shiftStartTime?: string;
  shiftEndTime?: string;
  isAvailable: boolean;
  createdAt: string;
  updatedAt: string;
  deletedAt?: string;
}

export interface ScheduleEvent {
  id: string;
  vipId: string;
  vip?: VIP;
  title: string;
  pickupLocation?: string;
  dropoffLocation?: string;
  location?: string;
  startTime: string;
  endTime: string;
  actualStartTime?: string;
  actualEndTime?: string;
  description?: string;
  type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
  status: 'SCHEDULED' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED';
  driverId?: string;
  driver?: Driver;
  vehicleId?: string;
  eventId?: string;
  event?: Event;
  notes?: string;
  createdAt: string;
  updatedAt: string;
  deletedAt?: string;
}

export interface EventTemplate {
  id: string;
  name: string;
  description?: string;
  defaultDuration: number; // in minutes
  location?: string;
  type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
  createdAt: string;
  updatedAt: string;
  deletedAt?: string;
  _count?: {
    events: number;
  };
}

export interface Event {
  id: string;
  name: string;
  description?: string;
  startTime: string;
  endTime: string;
  location: string;
  type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
  templateId?: string;
  template?: EventTemplate;
  attendees: EventAttendance[];
  scheduleTasks?: ScheduleEvent[];
  createdAt: string;
  updatedAt: string;
  deletedAt?: string;
  _count?: {
    attendees: number;
    scheduleTasks: number;
  };
}

export interface EventAttendance {
  id: string;
  eventId: string;
  vipId: string;
  vip: VIP;
  addedAt: string;
}

export interface CreateEventTemplateDto {
  name: string;
  description?: string;
  defaultDuration: number;
  location?: string;
  type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
}

export interface CreateEventDto {
  name: string;
  description?: string;
  startTime: string;
  endTime: string;
  location: string;
  type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
  templateId?: string;
}

export interface AddVipsToEventDto {
  vipIds: string[];
  pickupMinutesBeforeEvent?: number;
  pickupLocationOverride?: string;
}
