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

export type { EnumOption } from '@/types/common';
export type EmployeeProfile = {
    full_name: string | null;
    phone_number: string | null;
    gender: string | null;
    gender_label: string | null;
    birth_date_formatted: string | null;
    birth_date_input: string | null;
    address: string | null;
    profile_photo_url: string | null;
};

export type EmployeeRecord = {
    join_date_formatted: string | null;
    resign_date_formatted: string | null;
    join_date_input: string | null;
    employment_status: string | null;
    employment_status_label: string | null;
    base_salary: number | null;
    base_salary_formatted: string;
};

export type EmployeeRole = {
    name: string;
};

export type EmployeeListItem = {
    id: number;
    email: string | null;
    username: string | null;
    is_active: boolean;
    role_label: string | null;
    profile: EmployeeProfile;
    employee: EmployeeRecord;
    roles: EmployeeRole[];
};

export type EmployeeFormData = {
    email: string;
    username: string;
    full_name: string;
    phone_number: string;
    gender: string;
    birth_date: string;
    address: string;
    join_date: string;
    employment_status: string;
    base_salary: string;
    role: string;
};

export type EmployeeFilters = {
    search: string;
    sort?: string;
    direction?: 'asc' | 'desc' | null;
    employment_status?: string;
};

export type PaginatedEmployees = Paginated<EmployeeListItem>;
