import type { Paginated } from '@/types/common';

export type LeaveRequestListItem = {
    id: number;
    employee_id: number;
    start_date_input: string;
    end_date_input: string;
    start_date_formatted: string;
    end_date_formatted: string;
    total_days: number;
    status: string;
    status_label: string;
    rejection_reason: string | null;
    employee_name: string;
    created_at_formatted: string;
    is_editable: boolean;
    can_verify: boolean;
};

export type LeaveRequestFormData = {
    start_date: string;
    end_date: string;
};

export type PaginatedLeaveRequests = Paginated<LeaveRequestListItem>;

export type LeaveRequestPageProps = {
    leaveRequests: PaginatedLeaveRequests;
    authEmployeeId: number | null;
    canSubmit: boolean;
    hasPending: boolean;
    filters: {
        search: string;
        sort?: string;
        direction?: 'asc' | 'desc';
    };
};
