import type { Composer } from 'vue-i18n'

import type { CardTypeStatus } from './schema'

export function getCardTypeStatuses(t: Composer['t']): { label: string, value: CardTypeStatus }[] {
  return [
    { label: t('admin.cardTypes.statusOptions.active'), value: 'active' },
    { label: t('admin.cardTypes.statusOptions.inactive'), value: 'inactive' },
  ]
}

export function getValueLabel(): string {
  return '充值金额'
}

export function getValueUnit(): string {
  return ''
}

export function formatValue(value: number): string {
  if (value === -1) {
    return '永久'
  }
  return `${value}`
}
