export enum RequestStatus {
  DRAFT = 'DRAFT',
  SUBMITTED = 'SUBMITTED',
  IN_REVIEW = 'IN_REVIEW',
  PENDING_RESUBMISSION = 'PENDING_RESUBMISSION',
  APPROVED = 'APPROVED',
  REJECTED = 'REJECTED',
  REVOKED = 'REVOKED',
  CANCELLED = 'CANCELLED',
}

// Alias for backward compatibility
export const LicenseRequestStatus = RequestStatus;
export type LicenseRequestStatus = RequestStatus;

export enum ApprovalStatus {
  PENDING = 'PENDING',
  APPROVED = 'APPROVED',
  REJECTED = 'REJECTED',
  CHANGES_REQUESTED = 'CHANGES_REQUESTED',
  REVIEW_REQUIRED = 'REVIEW_REQUIRED',
}

export enum TransactionType {
  MINT_NFT = 'MINT_NFT',
  APPROVAL = 'APPROVAL',
  DOC_UPDATE = 'DOC_UPDATE',
  REJECT = 'REJECT',
  REVOKE = 'REVOKE',
}

export enum TransactionStatus {
  PENDING = 'PENDING',
  CONFIRMED = 'CONFIRMED',
  FAILED = 'FAILED',
}

export enum WebhookEventType {
  APPROVAL_REQUIRED = 'APPROVAL_REQUIRED',
  DOCUMENT_UPDATED = 'DOCUMENT_UPDATED',
  REQUEST_APPROVED = 'REQUEST_APPROVED',
  REQUEST_REJECTED = 'REQUEST_REJECTED',
  CHANGES_REQUESTED = 'CHANGES_REQUESTED',
}

export enum WebhookDeliveryStatus {
  PENDING = 'PENDING',
  SUCCESS = 'SUCCESS',
  FAILED = 'FAILED',
}

// Alias for backward compatibility
export const WebhookLogStatus = WebhookDeliveryStatus;
export type WebhookLogStatus = WebhookDeliveryStatus;

export enum ActorType {
  APPLICANT = 'APPLICANT',
  DEPARTMENT = 'DEPARTMENT',
  SYSTEM = 'SYSTEM',
  ADMIN = 'ADMIN',
}

export enum EntityType {
  REQUEST = 'REQUEST',
  APPROVAL = 'APPROVAL',
  DOCUMENT = 'DOCUMENT',
  DEPARTMENT = 'DEPARTMENT',
  WORKFLOW = 'WORKFLOW',
  APPLICANT = 'APPLICANT',
}

export enum AuditAction {
  CREATE = 'CREATE',
  UPDATE = 'UPDATE',
  DELETE = 'DELETE',
  SUBMIT = 'SUBMIT',
  APPROVE = 'APPROVE',
  REJECT = 'REJECT',
  CANCEL = 'CANCEL',
  UPLOAD = 'UPLOAD',
  DOWNLOAD = 'DOWNLOAD',
}

export enum RequestType {
  RESORT_LICENSE = 'RESORT_LICENSE',
  TRADE_LICENSE = 'TRADE_LICENSE',
  BUILDING_PERMIT = 'BUILDING_PERMIT',
}

export enum DocumentType {
  PROPERTY_OWNERSHIP = 'PROPERTY_OWNERSHIP',
  FIRE_SAFETY_CERTIFICATE = 'FIRE_SAFETY_CERTIFICATE',
  BUILDING_PLAN = 'BUILDING_PLAN',
  ENVIRONMENTAL_CLEARANCE = 'ENVIRONMENTAL_CLEARANCE',
  HEALTH_CERTIFICATE = 'HEALTH_CERTIFICATE',
  TAX_CLEARANCE = 'TAX_CLEARANCE',
  IDENTITY_PROOF = 'IDENTITY_PROOF',
  OTHER = 'OTHER',
}

export enum WorkflowExecutionType {
  SEQUENTIAL = 'SEQUENTIAL',
  PARALLEL = 'PARALLEL',
}

export enum CompletionCriteria {
  ALL = 'ALL',
  ANY = 'ANY',
  THRESHOLD = 'THRESHOLD',
}

export enum TimeoutAction {
  NOTIFY = 'NOTIFY',
  ESCALATE = 'ESCALATE',
  AUTO_REJECT = 'AUTO_REJECT',
}

export enum RejectionAction {
  FAIL_REQUEST = 'FAIL_REQUEST',
  RETRY_STAGE = 'RETRY_STAGE',
  ESCALATE = 'ESCALATE',
}

export enum UserRole {
  ADMIN = 'ADMIN',
  DEPARTMENT = 'DEPARTMENT',
  APPLICANT = 'APPLICANT',
}
