"use strict";
// Native translation loader - imports translations directly for bundling
// Metro will use this file for React Native builds
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadTranslationData = loadTranslationData;
const tslib_1 = require("tslib");
// Import all translations directly so they're bundled into the app
const common_json_1 = tslib_1.__importDefault(require("../../public/locales/en-US/common.json"));
const settings_json_1 = tslib_1.__importDefault(require("../../public/locales/en-US/settings.json"));
const common_json_2 = tslib_1.__importDefault(require("../../public/locales/es-ES/common.json"));
const settings_json_2 = tslib_1.__importDefault(require("../../public/locales/es-ES/settings.json"));
const common_json_3 = tslib_1.__importDefault(require("../../public/locales/fr-FR/common.json"));
const settings_json_3 = tslib_1.__importDefault(require("../../public/locales/fr-FR/settings.json"));
const common_json_4 = tslib_1.__importDefault(require("../../public/locales/pt-BR/common.json"));
const settings_json_4 = tslib_1.__importDefault(require("../../public/locales/pt-BR/settings.json"));
const common_json_5 = tslib_1.__importDefault(require("../../public/locales/ro-RO/common.json"));
const settings_json_5 = tslib_1.__importDefault(require("../../public/locales/ro-RO/settings.json"));
const common_json_6 = tslib_1.__importDefault(require("../../public/locales/zh-Hans/common.json"));
const settings_json_6 = tslib_1.__importDefault(require("../../public/locales/zh-Hans/settings.json"));
const common_json_7 = tslib_1.__importDefault(require("../../public/locales/zh-Hant/common.json"));
const settings_json_7 = tslib_1.__importDefault(require("../../public/locales/zh-Hant/settings.json"));
const translationMap = {
    "en-US/common": common_json_1.default,
    "en-US/settings": settings_json_1.default,
    "pt-BR/common": common_json_4.default,
    "pt-BR/settings": settings_json_4.default,
    "es-ES/common": common_json_2.default,
    "es-ES/settings": settings_json_2.default,
    "zh-Hans/common": common_json_6.default,
    "zh-Hans/settings": settings_json_6.default,
    "zh-Hant/common": common_json_7.default,
    "zh-Hant/settings": settings_json_7.default,
    "fr-FR/common": common_json_3.default,
    "fr-FR/settings": settings_json_3.default,
    "ro-RO/common": common_json_5.default,
    "ro-RO/settings": settings_json_5.default,
};
async function loadTranslationData(locale, namespace) {
    // Map base language codes to full locales
    const fullLocale = locale.includes("-")
        ? locale
        : {
            en: "en-US",
            pt: "pt-BR",
            es: "es-ES",
            zh: "zh-Hant",
            fr: "fr-FR",
            ro: "ro-RO",
        }[locale] || locale;
    const localeNamespaceKey = `${fullLocale}/${namespace}`;
    const translations = translationMap[localeNamespaceKey];
    if (!translations) {
        throw new Error(`No translation mapping for ${localeNamespaceKey}`);
    }
    if (!translations || Object.keys(translations).length === 0) {
        throw new Error("No translations found");
    }
    return translations;
}
//# sourceMappingURL=i18n-loader.native.js.map