import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
import { ProjectFlockKandang } from '@/types/api/production/project-flock-kandang';

export type BaseChickin = {
  id?: number;
  chick_in_date?: string;
  quantity?: number;
  note?: string;
  project_flock_kandang?: ProjectFlockKandang;
  approval: BaseApproval;
};

export type Chickin = BaseMetadata & BaseChickin;

export type CreateChickinPayload = {
  project_flock_kandang_id: number;
  chickin_requests: {
    chick_in_date: string;
    note?: string;
    product_warehouse_id: number;
  }[];
};

export type UpdateChickinPayload = CreateChickinPayload & {
  id: number;
};

export type ChickinApprovalPayload = {
  action: 'APPROVED' | 'REJECTED';
  approvable_ids: number[];
};
