import { translations } from "../../pn-marketweb-siteheader/translations";
/**
 * Safe fallback i18n object used before translations have been resolved,
 * or if a language is missing from the translation table.
 */
export const defaultHeaderI18n = {
    searchlabel: '',
    searchplaceholder: '',
    searchbuttontext: '',
    menuHomeButton: '',
    menuGoBackButton: '',
    mainMenuButton: '',
    menuStartButton: '',
    profileSelectionFlyoutHeading: '',
    unifiedLoginButton: '',
    unifiedMyPagesButton: '',
    home: 'Home',
};
/**
 * Resolves the i18n object for the current language and applies overrides.
 *
 * What it does:
 * - Looks up translation values for the selected language
 * - Falls back to a safe default object if the language is missing
 * - Allows the search placeholder to be overridden by a prop
 * - Ensures "home" always has a non-empty fallback value
 */
export function resolveHeaderTranslations(language, searchPlaceholder) {
    const resolved = (language && translations[language]) ? translations[language] : defaultHeaderI18n;
    return {
        ...defaultHeaderI18n,
        ...resolved,
        searchplaceholder: searchPlaceholder || resolved.searchplaceholder || '',
        home: resolved.home && resolved.home.trim() !== '' ? resolved.home : 'Home',
    };
}
//# sourceMappingURL=header-i18n.js.map
