export const SHIFT_TYPES = [
    'REGULAR', 
    'EVENING', 
    'EMERGENCY',
    'OVERTIME', 
    'HOLIDAY', 
    'VACATION', 
    'SICK'
];

export type ShiftType = 'REGULAR' | 'EVENING' | 'EMERGENCY' | 'OVERTIME' | 'HOLIDAY' | 'VACATION' | 'SICK' ;

export type UpsertAction = 'create' | 'update' | 'delete';

export type ShiftLegendItem = {
    type:        ShiftType;
    color:       string;
    label_type:   string;
    text_color?: string;
};

export interface Shift {
    date:        string;
    type:        ShiftType;
    start_time:  string;
    end_time:    string;
    comment:     string | undefined;
    is_approved: boolean;
    is_remote:   boolean;
}

export interface UpsertShiftsResponse {
    action: UpsertAction;
    day:    Shift[];
}

export interface UpsertShift {
    old_shift?: Shift | undefined;
    new_shift?: Shift | undefined;
}

export const default_shift: Readonly<Shift> = {
    date: '',
    start_time: '--:--',
    end_time: '--:--',
    type: 'REGULAR',
    comment: '',
    is_approved: false,
    is_remote: false,
};