import type { LocaleConfig } from '../types';

export const en: LocaleConfig = {
  locale: 'en',
  name: 'English',
  scripts: ['latn'],
  countries: ['US', 'GB', 'CA', 'AU', 'IE', 'NZ', 'ZA'],
  phoneContextKeywords: [
    'telephone',
    'cellphone',
    'phone number',
    'mobile',
    'phone',
    'fax',
    'tel.',
    'tel',
    'call',
    'cell',
  ],
  cvcContextKeywords: [
    'card security code',
    'card-security-code',
    'security code',
    'cvc',
    'cvv',
    'cv2',
  ],
  address: {
    forms: ['standard'],
    postcodeForm: 'us',
    postcodeRegex: '\\d{5}(?:-\\d{4})?|[A-Z]{1,2}\\d[A-Z\\d]?\\s?\\d[A-Z]{2}',
    requireUppercase: true,
    streetKeywordsStandard: [
      'Street',
      'St.',
      'Avenue',
      'Ave.',
      'Ave',
      'Road',
      'Rd.',
      'Drive',
      'Dr.',
      'Lane',
      'Ln.',
      'Boulevard',
      'Blvd.',
      'Blvd',
      'Court',
      'Ct.',
      'Way',
      'Place',
      'Pl.',
      'Highway',
      'Hwy.',
      'Hwy',
      'Terrace',
      'Ter.',
      'Parkway',
      'Pkwy.',
      'Pkwy',
      'Loop',
      'Circle',
      'Cir.',
      'Trail',
      'Crescent',
      'Cres.',
      'Square',
      'Sq.',
      'Expressway',
      'Expwy.',
      'Freeway',
      'Fwy.',
      'Turnpike',
      'Tpke.',
      'Mews',
      'Gardens',
      'Gdns.',
      'Close',
      'Cl.',
    ],
    floorKeywords: [
      'Apartment',
      'Apt.',
      'Apt',
      'Suite',
      'Ste.',
      'Unit',
      'Floor',
      'Flat',
      'c/o',
    ],
    ordinalNumberSuffixes: ['st', 'nd', 'rd', 'th'],
    directionalSuffixes: ['NW', 'NE', 'SW', 'SE', 'N', 'S', 'E', 'W'],
    houseNumberMarkers: ['no.', 'number', '#'],
    poBoxKeywords: ['P.O. Box', 'PO Box', 'P O Box'],
    countryNames: [
      'United Kingdom',
      'United States',
      'USA',
      'US',
      'UK',
      'Ireland',
      'Canada',
      'Australia',
      'New Zealand',
      'South Africa',
    ],
  },
  nationalIds: [
    {
      id: 'uk-nino',
      name: 'UK National Insurance Number',
      pattern:
        '\\b[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z]\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?[A-D]\\b',
      replacement: '[UK_NINO]',
    },
    {
      id: 'uk-nhs',
      name: 'UK NHS Number',
      pattern: '\\b\\d{3}\\s?\\d{3}\\s?\\d{4}\\b',
      checksum: 'luhn',
      replacement: '[UK_NHS]',
    },
    {
      id: 'ca-sin',
      name: 'Canadian Social Insurance Number',
      pattern: '\\b\\d{3}[- ]?\\d{3}[- ]?\\d{3}\\b',
      checksum: 'luhn',
      replacement: '[CA_SIN]',
    },
    {
      id: 'ie-pps',
      name: 'Irish PPS Number',
      pattern: '\\b\\d{7}[A-W][WH]?\\b',
      checksum: 'ie-mod23',
      replacement: '[IE_PPS]',
    },
    {
      id: 'ca-passport',
      name: 'Canadian Passport Number',
      pattern: '\\b[A-Z]{2}\\d{6}\\b',
      replacement: '[PASSPORT]',
    },
    {
      id: 'au-tfn',
      name: 'Australian Tax File Number',
      pattern: '\\b\\d{3}\\s?\\d{3}\\s?\\d{3}\\b',
      checksum: 'au-tfn',
      replacement: '[AU_TFN]',
    },
    {
      id: 'au-medicare',
      name: 'Australian Medicare Number',
      pattern: '\\b[2-6]\\d{3}\\s?\\d{5}\\s?\\d\\b',
      replacement: '[AU_MEDICARE]',
    },
    {
      id: 'nz-ird',
      name: 'New Zealand IRD Number',
      pattern: '\\b\\d{2,3}-?\\d{3}-?\\d{3}\\b',
      checksum: 'nz-ird',
      replacement: '[NZ_IRD]',
    },
    {
      id: 'za-id',
      name: 'South African ID Number',
      pattern: '\\b\\d{6}\\s?\\d{4}\\s?\\d{3}\\b',
      checksum: 'luhn',
      replacement: '[ZA_ID]',
    },
    {
      id: 'hk-hkid',
      name: 'Hong Kong HKID',
      pattern: '\\b[A-Z]{1,2}\\d{6}\\(?[A0-9]\\)?\\b',
      checksum: 'hk-hkid',
      replacement: '[HK_HKID]',
    },
    {
      id: 'sg-nric',
      name: 'Singapore NRIC / FIN',
      pattern: '\\b[STFGM]\\d{7}[A-Z]\\b',
      replacement: '[SG_NRIC]',
    },
  ],
  dateOfBirth: {
    monthsLong: [
      'January',
      'February',
      'March',
      'April',
      'May',
      'June',
      'July',
      'August',
      'September',
      'October',
      'November',
      'December',
    ],
    monthsShort: [
      'Jan',
      'Jan.',
      'Feb',
      'Feb.',
      'Mar',
      'Mar.',
      'Apr',
      'Apr.',
      'May',
      'Jun',
      'Jun.',
      'Jul',
      'Jul.',
      'Aug',
      'Aug.',
      'Sep',
      'Sep.',
      'Oct',
      'Oct.',
      'Nov',
      'Nov.',
      'Dec',
      'Dec.',
    ],
    contextKeywords: [
      'born on',
      'date of birth',
      'birthday',
      'birthdate',
      'DOB',
      'd.o.b.',
    ],
  },
};
