export type ScheduleEventType = "DELIVERY" | "RETURN" | "MAINTENANCE" | "INSPECTION";
export type ScheduleEventStatus = "SCHEDULED" | "IN_TRANSIT" | "COMPLETED" | "CANCELED";

export interface ScheduleEventCustomerSummary {
  id: string;
  name: string;
  document?: string;
  phone?: string | null;
}

export interface ScheduleEventEquipmentSummary {
  id: string;
  code: string;
  assetTag: string;
  brand: string;
  model: string;
}

export interface ScheduleEvent {
  id: string;
  companyId: string;
  title: string;
  type: ScheduleEventType;
  customerId?: string | null;
  equipmentId?: string | null;
  startDate: string;
  endDate: string;
  location?: string | null;
  technician?: string | null;
  notes?: string | null;
  status: ScheduleEventStatus;
  createdAt: string;
  customer?: ScheduleEventCustomerSummary;
  equipment?: ScheduleEventEquipmentSummary;
}

export interface CreateScheduleEventDTO {
  title: string;
  type: ScheduleEventType;
  customerId?: string;
  equipmentId?: string;
  startDate: string;
  endDate: string;
  location?: string;
  technician?: string;
  notes?: string;
  status?: ScheduleEventStatus;
}

export type UpdateScheduleEventDTO = Partial<CreateScheduleEventDTO>;

export interface ScheduleStats {
  totalEvents: number;
  todayEvents: number;
  scheduledDeliveries: number;
  scheduledReturns: number;
  pendingMaintenance: number;
}

export interface ScheduleFilterParams {
  search?: string;
  type?: ScheduleEventType | "ALL";
  status?: ScheduleEventStatus | "ALL";
  startDate?: string;
  endDate?: string;
}
