//#region src/components/CountryFlag/countryFlagSvgUrls.ts
/**
* Builds a country-code → SVG URL map from a Vite `import.meta.glob` result.
*
* Usage in an app:
* ```ts
* import { buildCountryFlagSvgUrls } from "@lightsparkdev/ui/src/components/CountryFlag/countryFlagSvgUrls";
* const flagModules = import.meta.glob(
*   "../../node_modules/@lightsparkdev/ui/src/static/images/country-flags-round/*.svg",
*   { eager: true, query: "?url" },
* );
* export const countryCodeToFlagSvgUrls = buildCountryFlagSvgUrls(flagModules);
* ```
*/
function buildCountryFlagSvgUrls(flagModules) {
	return Object.fromEntries(Object.entries(flagModules).map(([path, module]) => {
		return [path.split("/").pop()?.split(".")[0] ?? "", module.default];
	}));
}
/**
* Maps currency codes to their primary country code for flag display.
*/
const CURRENCY_TO_COUNTRY = {
	USD: "us",
	MXN: "mx",
	BRL: "br",
	CAD: "ca",
	COP: "co",
	ARS: "ar",
	GBP: "gb",
	DKK: "dk",
	EUR: "eu",
	AED: "ae",
	INR: "in",
	PHP: "ph",
	IDR: "id",
	MYR: "my",
	SGD: "sg",
	THB: "th",
	VND: "vn",
	CNY: "cn",
	HKD: "hk",
	BWP: "bw",
	KES: "ke",
	MWK: "mw",
	NGN: "ng",
	RWF: "rw",
	ZAR: "za",
	TZS: "tz",
	UGX: "ug",
	ZMW: "zm",
	GHS: "gh",
	CDF: "cd",
	XOF: "sn",
	AUD: "au"
};
//#endregion
export { CURRENCY_TO_COUNTRY, buildCountryFlagSvgUrls };
