import { countries as countriesData } from 'countries-list';
// ISO 3166-1 codes for non-independent / dependent territories.
// `countries-list` does not expose an `independent` flag, so we filter using this set.
// Source: world-countries dataset (`country.independent === false`).
const DEPENDENT_AREAS = new Set([
    'AW',
    'AI',
    'AX',
    'AS',
    'AQ',
    'TF',
    'BL',
    'SH',
    'BM',
    'BQ',
    'BV',
    'CC',
    'CK',
    'CW',
    'CX',
    'KY',
    'EH',
    'FK',
    'FO',
    'GG',
    'GI',
    'GP',
    'GL',
    'GF',
    'GU',
    'HK',
    'HM',
    'IM',
    'IO',
    'JE',
    'XK',
    'MO',
    'MF',
    'MP',
    'MS',
    'MQ',
    'YT',
    'NC',
    'NF',
    'NU',
    'PN',
    'PR',
    'PS',
    'PF',
    'RE',
    'GS',
    'SJ',
    'PM',
    'SX',
    'TC',
    'TK',
    'TW',
    'UM',
    'VG',
    'VI',
    'WF',
]);
export const countries = Object.entries(countriesData).map(([code, c]) => ({
    cca2: code,
    name: c.name,
    independent: !DEPENDENT_AREAS.has(code),
}));
export const findCountry = (cca2) => countries.find((c) => c.cca2 === cca2);
//# sourceMappingURL=countries.js.map