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

export const periodCloseLifecycle = defineLifecycle({
    beginClose: { from: ["NOT_STARTED"], to: "IN_PROGRESS" },
    verifySubledgerTransfers: { from: ["IN_PROGRESS"], to: "SUBLEDGERS_VERIFIED" },
    postAdjustingEntries: { from: ["SUBLEDGERS_VERIFIED"], to: "ADJUSTMENTS_POSTED" },
    verifyTrialBalance: { from: ["ADJUSTMENTS_POSTED"], to: "TRIAL_BALANCE_VERIFIED" },
    approveAndLockPeriod: { from: ["TRIAL_BALANCE_VERIFIED"], to: "SOFT_LOCKED" },
    revertSoftLock: { from: ["SOFT_LOCKED"], to: "IN_PROGRESS" },
    finalCloseAndLockPeriod: { from: ["SOFT_LOCKED"], to: "PERMANENTLY_CLOSED" },
});

export type PeriodCloseStatus = typeof periodCloseLifecycle.states[number];
