export type PensionReportGroup =
  | 'social_security'
  | 'occupational_pension'
  | 'provident'
  | 'other'
  | 'tier1'
  | 'tier2'
  | 'tier3';
export type PensionContributor = 'employee' | 'employer';
export type PensionAllocationMode = 'none' | 'direct_pool' | 'profile';

export interface PensionPool {
  id: string;
  country_code: string;
  code: string;
  name: string;
  report_group: PensionReportGroup;
  report_group_label?: string;
  is_active: boolean;
  created_at?: string;
  updated_at?: string;
}

export interface PensionAllocationProfileItem {
  id: string;
  pension_allocation_profile_id: string;
  pension_pool_id: string;
  ratio: string;
  pool?: PensionPool;
}

export interface PensionAllocationProfile {
  id: string;
  country_code: string;
  code: string;
  name: string;
  is_active: boolean;
  items: PensionAllocationProfileItem[];
  created_at?: string;
  updated_at?: string;
}

export interface CreatePensionPoolPayload {
  country_code?: string;
  code: string;
  name: string;
  report_group: PensionReportGroup;
  is_active?: boolean;
}

export interface UpdatePensionPoolPayload extends Partial<CreatePensionPoolPayload> {
  id: string;
}

export interface CreatePensionAllocationProfilePayload {
  country_code?: string;
  code: string;
  name: string;
  is_active?: boolean;
  items: Array<{
    pension_pool_id: string;
    ratio: number;
  }>;
}

export interface UpdatePensionAllocationProfilePayload
  extends Partial<CreatePensionAllocationProfilePayload> {
  id: string;
}
