51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import { CountryCode, CountryConfig } from '../types';
|
|
|
|
export const COUNTRIES: CountryConfig[] = [
|
|
{
|
|
code: 'GT',
|
|
name: 'Guatemala',
|
|
flag: import.meta.env.BASE_URL + 'gt-flag.png',
|
|
currency: 'GTQ',
|
|
locale: 'es-GT',
|
|
enabled: true,
|
|
},
|
|
{
|
|
code: 'TT',
|
|
name: 'Trinidad y Tobago',
|
|
flag: import.meta.env.BASE_URL + 'tt-flag.png',
|
|
currency: 'TTD',
|
|
locale: 'en-TT',
|
|
enabled: true,
|
|
},
|
|
{
|
|
code: 'PA',
|
|
name: 'Panamá',
|
|
flag: 'https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/Flag_of_Panama.svg',
|
|
currency: 'USD',
|
|
locale: 'es-PA',
|
|
enabled: true,
|
|
},
|
|
{
|
|
code: 'SV',
|
|
name: 'El Salvador',
|
|
flag: 'https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/Flag_of_El_Salvador.svg.webp',
|
|
currency: 'USD',
|
|
locale: 'es-SV',
|
|
enabled: true,
|
|
},
|
|
{
|
|
code: 'HN',
|
|
name: 'Honduras',
|
|
flag: 'https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/Bandera%20de%20Honduras.webp',
|
|
currency: 'HNL',
|
|
locale: 'es-HN',
|
|
enabled: true,
|
|
},
|
|
];
|
|
|
|
export const DEFAULT_COUNTRY_CODE: CountryCode = 'GT';
|
|
|
|
export function getCountryConfig(code: CountryCode): CountryConfig {
|
|
return COUNTRIES.find((country) => country.code === code) ?? COUNTRIES[0];
|
|
}
|