/**
 * Period type
 */
export const AccountingPeriodPeriodType = {
  "OPERATING": "OPERATING",
  "ADJUSTMENT": "ADJUSTMENT"
} as const;
export type AccountingPeriodPeriodType = (typeof AccountingPeriodPeriodType)[keyof typeof AccountingPeriodPeriodType];

/**
 * Accounting period lifecycle status
 */
export const AccountingPeriodStatus = {
  "NEVER_OPENED": "NEVER_OPENED",
  "FUTURE_ENTERABLE": "FUTURE_ENTERABLE",
  "OPEN": "OPEN",
  "CLOSED": "CLOSED",
  "PERMANENTLY_CLOSED": "PERMANENTLY_CLOSED"
} as const;
export type AccountingPeriodStatus = (typeof AccountingPeriodStatus)[keyof typeof AccountingPeriodStatus];

/**
 * Type of financial statement
 */
export const FinancialStatementStatementType = {
  "BALANCE_SHEET": "BALANCE_SHEET",
  "PROFIT_AND_LOSS": "PROFIT_AND_LOSS",
  "CASH_FLOW": "CASH_FLOW"
} as const;
export type FinancialStatementStatementType = (typeof FinancialStatementStatementType)[keyof typeof FinancialStatementStatementType];

/**
 * Financial statement lifecycle status
 */
export const FinancialStatementStatus = {
  "DRAFT": "DRAFT",
  "FINALIZED": "FINALIZED"
} as const;
export type FinancialStatementStatus = (typeof FinancialStatementStatus)[keyof typeof FinancialStatementStatus];

/**
 * Line type: DETAIL, SUBTOTAL, or TOTAL
 */
export const FinancialStatementLineItemLineType = {
  "DETAIL": "DETAIL",
  "SUBTOTAL": "SUBTOTAL",
  "TOTAL": "TOTAL"
} as const;
export type FinancialStatementLineItemLineType = (typeof FinancialStatementLineItemLineType)[keyof typeof FinancialStatementLineItemLineType];

/**
 * Journal type categorizing the business origin (SALES, PURCHASE, CASH, BANK, MISCELLANEOUS, OPENING, CLOSING, INVENTORY, MANUFACTURING)
 */
export const JournalEntryJournalType = {
  "SALES": "SALES",
  "PURCHASE": "PURCHASE",
  "CASH": "CASH",
  "BANK": "BANK",
  "MISCELLANEOUS": "MISCELLANEOUS",
  "OPENING": "OPENING",
  "CLOSING": "CLOSING",
  "INVENTORY": "INVENTORY",
  "MANUFACTURING": "MANUFACTURING"
} as const;
export type JournalEntryJournalType = (typeof JournalEntryJournalType)[keyof typeof JournalEntryJournalType];

/**
 * Journal entry lifecycle status (DRAFT, POSTED, REVERSED)
 */
export const JournalEntryStatus = {
  "DRAFT": "DRAFT",
  "POSTED": "POSTED",
  "REVERSED": "REVERSED"
} as const;
export type JournalEntryStatus = (typeof JournalEntryStatus)[keyof typeof JournalEntryStatus];

/**
 * Optional adjusting entry type for period-end adjustments (ACCRUAL, DEFERRAL, RECLASSIFICATION)
 */
export const JournalEntryAdjustingEntryType = {
  "ACCRUAL": "ACCRUAL",
  "DEFERRAL": "DEFERRAL",
  "RECLASSIFICATION": "RECLASSIFICATION"
} as const;
export type JournalEntryAdjustingEntryType = (typeof JournalEntryAdjustingEntryType)[keyof typeof JournalEntryAdjustingEntryType];

/**
 * Period close lifecycle status
 */
export const PeriodCloseStatus = {
  "NOT_STARTED": "NOT_STARTED",
  "IN_PROGRESS": "IN_PROGRESS",
  "SUBLEDGERS_VERIFIED": "SUBLEDGERS_VERIFIED",
  "ADJUSTMENTS_POSTED": "ADJUSTMENTS_POSTED",
  "TRIAL_BALANCE_VERIFIED": "TRIAL_BALANCE_VERIFIED",
  "UNDER_REVIEW": "UNDER_REVIEW",
  "SOFT_LOCKED": "SOFT_LOCKED",
  "PERMANENTLY_CLOSED": "PERMANENTLY_CLOSED"
} as const;
export type PeriodCloseStatus = (typeof PeriodCloseStatus)[keyof typeof PeriodCloseStatus];

/**
 * Trial balance variant (PRE_CLOSE or POST_CLOSE)
 */
export const TrialBalanceVariant = {
  "PRE_CLOSE": "PRE_CLOSE",
  "POST_CLOSE": "POST_CLOSE"
} as const;
export type TrialBalanceVariant = (typeof TrialBalanceVariant)[keyof typeof TrialBalanceVariant];
