import { AllowanceType } from './AllowanceType';

export interface EmployeeAllowance {
  id: string;
  employee_id: string;
  allowance_type_id: string;
  amount: string;
  effective_date: string;
  end_date: string | null;
  employee?: {
    employee_id: string;
    staff_id: string;
    firstname: string;
    lastname: string;
    full_name: string;
  };
  allowance_type?: AllowanceType;
  created_at: string;
  updated_at: string;
}

export interface CreateEmployeeAllowancePayload {
  employee_id: string;
  allowance_type_id: string;
  amount: number;
  effective_date: string;
  end_date?: string | null;
}

export interface UpdateEmployeeAllowancePayload {
  id: string;
  amount?: number;
  effective_date?: string;
  end_date?: string | null;
}

export interface DeleteEmployeeAllowancePayload {
  message: string;
  id?: string;
}

export interface AllowanceMatrixEmployee {
  employee_id: string;
  staff_id: string;
  full_name: string;
  allowances: Record<string, { allowance_id: string | null; amount: string | null }>;
}

export interface AllowanceMatrixResponse {
  allowance_types: { id: string; name: string; code: string }[];
  employees: AllowanceMatrixEmployee[];
}
