// Questo file fa parte di MyTown.
// MyTown è software libero: puoi ridistribuirlo e/o modificarlo secondo
// i termini della GNU Affero General Public License come pubblicata dalla
// Free Software Foundation, versione 3.
// Distribuito senza ALCUNA GARANZIA; vedi la GNU AGPL v3 per i dettagli.
// Copyright (C) Kondor Consulting & Services S.r.l.
// SPDX-License-Identifier: AGPL-3.0-or-later

export interface WeeklyTemplate {
	wt_id: number;
	wt_cmp_id: number;
	wt_operator_em_id: number;
	wt_day_of_week: number; // 0=Dom .. 6=Sab
	wt_start_time: string; // "HH:mm"
	wt_end_time: string; // "HH:mm"
	wt_break_start: string; // "HH:mm" - inizio pausa
	wt_break_end: string; // "HH:mm" - fine pausa
	wt_active: boolean;
	operator_firstname?: string;
	operator_lastname?: string;
}

export interface AvailabilityException {
	ae_id: number;
	ae_cmp_id: number;
	ae_operator_em_id: number;
	ae_date: string;
	ae_type: 'BLOCKED' | 'CUSTOM';
	ae_start_time: string | null;
	ae_end_time: string | null;
	ae_reason: string;
	ae_created_at: string;
}

export interface FreeSlot {
	operator_em_id: number;
	operator_name: string;
	date: string;
	start_time: string;
	end_time: string;
	duration_minutes: number;
	reserved: boolean;
}

export interface OperatorSimple {
	em_id: number;
	em_firstname: string;
	em_lastname: string;
}
