/**
 * Availability Module Types
 *
 * Tipos para gerenciamento de disponibilidade dos médicos
 */

/**
 * Dias da semana
 */
export type Weekday =
  | "segunda"
  | "terca"
  | "quarta"
  | "quinta"
  | "sexta"
  | "sabado"
  | "domingo";

/**
 * Tipo de atendimento
 */
export type AppointmentType = "presencial" | "telemedicina";

/**
 * Interface para disponibilidade de médico
 */
export interface DoctorAvailability {
  id?: string;
  doctor_id?: string;
  weekday?: Weekday;
  start_time?: string; // Formato: HH:MM:SS (ex: "09:00:00")
  end_time?: string; // Formato: HH:MM:SS (ex: "17:00:00")
  slot_minutes?: number; // Default: 30
  appointment_type?: AppointmentType;
  active?: boolean; // Default: true
  created_at?: string;
  updated_at?: string;
  created_by?: string;
  updated_by?: string | null;
}

/**
 * Filtros para listagem de disponibilidades
 */
export interface ListAvailabilityFilters {
  select?: string;
  doctor_id?: string;
  active?: boolean;
}

/**
 * Input para criar disponibilidade
 */
export interface CreateAvailabilityInput {
  doctor_id: string; // required
  weekday: Weekday; // required
  start_time: string; // required - Formato: HH:MM:SS (ex: "09:00:00")
  end_time: string; // required - Formato: HH:MM:SS (ex: "17:00:00")
  slot_minutes?: number; // optional - Default: 30
  appointment_type?: AppointmentType; // optional - Default: 'presencial'
  active?: boolean; // optional - Default: true
}

/**
 * Input para atualizar disponibilidade
 */
export interface UpdateAvailabilityInput {
  weekday?: Weekday;
  start_time?: string; // Formato: HH:MM:SS (ex: "09:00:00")
  end_time?: string; // Formato: HH:MM:SS (ex: "17:00:00")
  slot_minutes?: number;
  appointment_type?: AppointmentType;
  active?: boolean;
}
