export const listingStatuses = ['draft', 'published', 'rented', 'offline', 'abnormal'] as const
export type ListingStatus = (typeof listingStatuses)[number]

export const listingReviewStatuses = ['none', 'pending', 'approved', 'rejected'] as const
export type ListingReviewStatus = (typeof listingReviewStatuses)[number]

export const orderStatuses = [
  'pending_confirm',
  'pending_payment',
  'pending_handoff',
  'renting',
  'overdue',
  'pending_return_confirm',
  'pending_checkout_confirm',
  'pending_checkout_accept',
  'checkout_disputing',
  'completed',
  'cancelled',
  'closed',
  'disputing',
  'abnormal',
] as const
export type OrderStatus = (typeof orderStatuses)[number]

export const handoffStatuses = [
  'pending_owner',
  'pending_renter_confirm',
  'received',
  'pending_owner_return_confirm',
  'pending_owner_checkout',
  'pending_renter_checkout',
  'checkout_disputed',
  'returned',
  'cancelled',
  'owner_timeout',
  'renter_confirm_timeout',
  'return_overdue',
  'owner_return_confirm_timeout',
  'owner_checkout_confirm_timeout',
  'admin_closed',
  'admin_abnormal',
  'arbitrated',
] as const
export type HandoffStatus = (typeof handoffStatuses)[number]

export const settlementStatuses = [
  'unsettled',
  'pending',
  'frozen',
  'settled',
  'refunded',
  'cancelled',
  'closed',
  'disputed',
  'arbitrated',
] as const
export type SettlementStatus = (typeof settlementStatuses)[number]

export const realnameStatuses = ['unknown', 'unverified', 'pending', 'verified', 'rejected'] as const
export type RealnameStatusValue = (typeof realnameStatuses)[number]

export const userStatuses = ['active', 'frozen', 'disabled'] as const
export type UserStatus = (typeof userStatuses)[number]

export const riskStatuses = ['normal', 'watch', 'restricted', 'blocked'] as const
export type RiskStatus = (typeof riskStatuses)[number]

export const disputeStatuses = ['open', 'processing', 'resolved', 'closed'] as const
export type DisputeStatus = (typeof disputeStatuses)[number]

export const walletStatuses = ['active', 'frozen', 'disabled'] as const
export type WalletStatus = (typeof walletStatuses)[number]

export const ledgerDirections = ['in', 'out', 'freeze', 'unfreeze'] as const
export type LedgerDirection = (typeof ledgerDirections)[number]

export const balanceTypes = ['available', 'frozen'] as const
export type BalanceType = (typeof balanceTypes)[number]
