import type { JobStatus, JobStep, ProstheticType } from "./schema";

export type JobFormState = {
  ok: boolean;
  error?: string;
  fieldErrors?: Record<string, string>;
  jobId?: string;
};

export const initialJobFormState: JobFormState = { ok: false };

export type JobActionState = {
  ok: boolean;
  error?: string;
};

export const initialJobActionState: JobActionState = { ok: false };

export const JOB_STATUS_LABELS: Record<JobStatus, string> = {
  pending: "Bekliyor",
  in_progress: "İşlemde",
  sent: "Gönderildi",
  delivered: "Teslim alındı",
  cancelled: "İptal",
};

export const JOB_STEP_LABELS: Record<JobStep, string> = {
  olcu: "Ölçü",
  alt_yapi_prova: "Alt Yapı Prova",
  ust_yapi_prova: "Üst Yapı Prova",
  cila_bitim: "Cila / Bitim",
};

export const JOB_STEP_ORDER: JobStep[] = [
  "olcu",
  "alt_yapi_prova",
  "ust_yapi_prova",
  "cila_bitim",
];

export const PROSTHETIC_TYPE_LABELS: Record<ProstheticType, string> = {
  metal_porselen: "Metal Porselen",
  zirkonyum: "Zirkonyum",
  implant_ustu_zirkonyum: "İmplant Üstü Zirkonyum",
  gecici: "Geçici",
  e_max: "E-Max",
  diger: "Diğer",
};
