// @generated — do not edit
import { defineLifecycle } from "@tailor-platform/erp-kit/core";

export const productionOrderLifecycle = defineLifecycle({
    release: { from: ["DRAFT"], to: "RELEASED" },
    cancel: { from: ["DRAFT", "RELEASED"], to: "CANCELLED" },
    unrelease: { from: ["RELEASED"], to: "DRAFT" },
    startWorkOrder: { from: ["RELEASED"], to: "IN_PROGRESS" },
    complete: { from: ["IN_PROGRESS"], to: "COMPLETED" },
    technicallyComplete: { from: ["COMPLETED"], to: "TECHNICALLY_COMPLETE" },
    reopen: { from: ["TECHNICALLY_COMPLETE"], to: "IN_PROGRESS" },
    close: { from: ["TECHNICALLY_COMPLETE"], to: "CLOSED" },
});

export type ProductionOrderStatus = typeof productionOrderLifecycle.states[number];
