export const PaymentMode = {
  CORE: 'CORE',
  SNAP: 'SNAP'
} as const

export type PaymentModeType = typeof PaymentMode[keyof typeof PaymentMode]

export function getPaymentMode(): PaymentModeType {
  return (import.meta.env.VITE_PAYMENT_GATEWAY_MODE as PaymentModeType) || 'SNAP'
}

export function isSnapMode(): boolean {
  return getPaymentMode() === PaymentMode.SNAP
}

export function isCoreMode(): boolean {
  return getPaymentMode() === PaymentMode.CORE
}