export interface PositionName {
  am: string;
  en: string;
}

export interface PositionDto {
  id: string;
  createdAt: string;
  updatedAt: string;
  name: PositionName;
  key: string;
  parentPositionId: string;
  unitId: string;
  organizationId: string;
  projectId: string | null;
  positionTypeId: string;
}

export interface DelegationTerminationReason {
  id: string;
  terminatedAt: string;
  comment: string;
  terminatorEmployeePosition: {
    id: string;
    employee: {
      id: string;
      name: {
        en: string;
        am: string;
      };
    };
  };
}

export interface DelegatePositionDto {
  status: string;
  delegationLetter: any;
  delegator: any;
  employee: any;
  record: any;
  id: string;
  amharicStartDate: string;
  amharicEndDate: string;
  createdAt: string;
  updatedAt: string;
  isDelegate: boolean;
  isCurrent: boolean;
  startDate: string;
  endDate: string;
  unitId: string;
  delegatorId: string;
  employeeId: string;
  positionId: string;
  position: PositionDto;
  delegateePosition: PositionDto;
  name: { am: string; en: string };
  delegationLetterId?: { id: string; referenceNumber: string };
  employeePositionId?: string;
  internalCC?: string[];
  stampId?: string;
  /** Present when the delegation was terminated early; carries the reason + when. */
  terminationReason?: DelegationTerminationReason | null;
}

export interface DelegatePositionResponse {
  data: DelegatePositionDto[];
  count: number;
}
