import { BaseMetadata } from '@/types/api/api-general';
import { ProjectFlock } from '@/types/api/production/project-flock';
import { BaseKandang } from '@/types/api/master-data/kandang';

export type BaseProductionResult = {
  project_flock: Pick<ProjectFlock, 'id' | 'name' | 'category'> & {
    kandang: Pick<BaseKandang, 'id' | 'name'>;
  };

  woa: number;

  // BW
  bw: number;
  std_bw: number;
  uniformity: number;
  std_uniformity: string; // "90% up" - keeping as string based on "up" suffix potential

  // Dep
  dep_kum: number;
  dep_std: number;

  // Butiran
  butiran_utuh: number;
  butiran_putih: number;
  butiran_retak: number;
  butiran_pecah: number;
  butiran_jumlah: number;
  total_butir: number;

  // Kg
  kg_utuh: number;
  kg_putih: number;
  kg_retak: number;
  kg_pecah: number;
  kg_jumlah: number;
  total_kg: number;

  // %
  persen_utuh: number;
  persen_putih: number;
  persen_retak: number;
  persen_pecah: number;

  // Produksi
  hd: number;
  hd_std: number;
  fi: number;
  fi_std: number;
  em: number;
  em_std: number;
  ew: number;
  ew_std: number;
  fcr: number;
  fcr_std: number;
  hh: number;
  hh_std: number;
};

export type ProductionResult = BaseMetadata & BaseProductionResult;
