import { FeatureFlag } from '../helpers/feature-control/feature-flag-controller';
import { AmexRegex, DiscoverRegex, MasterCardRegex, VisaRegex } from './regex';
export const CARDS_INFO = [
  {
    type: 'visa',
    iconName: 'visa',
    pattern: VisaRegex,
    maskConfig: {
      type: 'custom',
      options: {
        mask: '9999 9999 9999 9999 999',
        slot: '9',
        accept: /\d/,
        triggerAtInit: FeatureFlag.isEnabled('VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD'),
      },
    },
  },
  {
    type: 'mastercard',
    iconName: 'mastercard',
    pattern: MasterCardRegex,
    maskConfig: {
      type: 'custom',
      options: {
        mask: '9999 9999 9999 9999',
        slot: '9',
        accept: /\d/,
        triggerAtInit: FeatureFlag.isEnabled('VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD'),
      },
    },
  },
  {
    type: 'amex',
    iconName: 'amex',
    pattern: AmexRegex,
    maskConfig: {
      type: 'custom',
      options: {
        mask: '9999 999999 99999',
        slot: '9',
        accept: /\d/,
        triggerAtInit: FeatureFlag.isEnabled('VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD'),
      },
    },
  },
  {
    type: 'discover',
    iconName: 'discover',
    pattern: DiscoverRegex,
    maskConfig: {
      type: 'custom',
      options: {
        mask: '9999 9999 9999 9999',
        slot: '9',
        accept: /\d/,
        triggerAtInit: FeatureFlag.isEnabled('VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD'),
      },
    },
  },
];
