'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-9a9efa1c.js');
const headerTheme = require('./header-theme-a250bf67.js');

function renderHeaderMenuSwitcher(props) {
    const structure = headerTheme.extractToggleableMenuStructure(props.vm.rawMenuItems);
    if (!structure.hasMenuSwitching) {
        return null;
    }
    const options = structure.menuModeOptions.map(option => ({
        ...option,
        href: props.navigateOnMenuToggle ? option.href : undefined,
    }));
    return (index.h("pn-marketweb-header-toggle", { value: props.activeMenuMode, options: options, onToggleChange: props.onMenuToggleChange }));
}
function renderHeaderLogo(props) {
    const homePageLink = props.homePageLink ?? '/';
    return (index.h("div", { class: "siteheader-logocontainer" },
        index.h("a", { href: homePageLink, title: props.homeLabel, "aria-label": props.homeLabel, class: "siteheader-logolink" },
            index.h("slot", { name: "logo" },
                index.h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65", role: "img", "aria-label": "PostNord" },
                    index.h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "currentColor", transform: "translate(0 0)" }))))));
}
function renderHeaderLogin(props) {
    if (!props.vm.loginDialog || props.hideLogin) {
        return null;
    }
    return (index.h("pn-marketweb-siteheader-login", { token: props.userToken, siteUrl: props.vm.siteDefinition?.url, fullname: props.userFullname, loggedin: props.userLoggedin, loginDialog: props.vm.loginDialog, endpoint: props.endpoint ?? '', i18n: props.i18n, showProfileSelection: props.showProfileSelection, showUnifiedLogin: props.showUnifiedLogin, "check-user-logged-in-state-interval": props.checkUserLoggedInStateInterval, useMarketwebLogin: props.useMarketwebLogin, environment: props.environment, appearance: props.appearance }));
}
function renderHeaderLanguageSelector(props) {
    if (!props.vm.languageOptions.length || props.hideLanguageSelector) {
        return null;
    }
    return (index.h("pn-language-selector", { value: props.language, appearance: props.appearance }, props.vm.languageOptions.map(language => (index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: headerTheme.getLanguageVersionUrl(language, props.vm.siteDefinition, props.spaMode) })))));
}
function renderHeaderSiteSelector(props) {
    if (!props.vm.siteSelector || props.hideSiteSelector) {
        return null;
    }
    return (index.h("pn-site-selector", { language: props.language, buttontext: props.buttonText, appearance: props.appearance },
        props.vm.siteSelector.currentSiteTitle && (index.h("pn-site-selector-item", { heading: props.vm.siteSelector.currentSiteTitle, description: props.vm.siteSelector.currentSiteDescription })),
        (props.vm.siteSelector.siteSelections ?? []).map(site => (index.h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: props.adjustSiteSelectorUrl(site.href ?? site.pageLink ?? ''), newwindow: site.openInNewWindow })))));
}

const pnMarketwebHeaderMainRowCss = "pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-marketweb-header-main-row{display:contents}pn-marketweb-header-main-row .siteheader-row-main{background-color:var(--siteheader-main-row-bg-mobile, transparent)}pn-marketweb-header-main-row .siteheader-mobile-left{display:flex;align-items:center;flex:1 1 auto;min-width:0;order:1}pn-marketweb-header-main-row .siteheader-mobile-logo{display:flex;align-items:center;justify-content:flex-start;min-width:0;order:1}pn-marketweb-header-main-row .siteheader-mobile-logo .siteheader-logocontainer{min-height:5.6rem;background:transparent;position:static;left:auto;transform:none}pn-marketweb-header-main-row .siteheader-mobile-logo .siteheader-logolink{max-height:5.6rem}pn-marketweb-header-main-row .siteheader-mobile-logo .siteheader-logo{display:block;width:auto;max-width:12.7rem;height:2.4rem}pn-marketweb-header-main-row .siteheader-mobile-menu-toggle{display:none;align-items:center}pn-marketweb-header-main-row .siteheader-mainnav-middle{display:none;align-items:center;justify-content:flex-end;order:3}pn-marketweb-header-main-row .siteheader-mainnav-middle>pn-marketweb-siteheader-search{display:flex;align-items:center;justify-content:flex-end}pn-marketweb-header-main-row .siteheader-mainnav-middle>[slot=header-bottom-button]{display:contents}pn-marketweb-header-main-row .siteheader-mainnav-menu{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;order:2}pn-marketweb-header-main-row .siteheader-mainnav-menu>[slot=mobile-toprightend]{display:flex;align-items:center;align-self:center;padding:1rem 0;margin-right:1.2rem;color:var(--siteheader-cart-link-color, var(--siteheader-top-link-color, inherit));text-decoration:none}pn-marketweb-header-main-row .siteheader-mainnav-menu>[slot=mobile-toprightend]>:not(pn-icon):not([data-cart-countindicator]){display:none}pn-marketweb-header-main-row .siteheader-mainnav-menu>[slot=mobile-toprightend] pn-icon svg>path{fill:var(--siteheader-cart-icon-color, var(--siteheader-top-icon-fill, currentColor))}pn-marketweb-header-main-row .siteheader-menu{max-width:100%;overflow:visible}pn-marketweb-header-main-row .siteheader-menu pn-mainnav-link a[target]::after{content:none}pn-marketweb-header-main-row .siteheader-menu pn-marketweb-siteheader-search{width:100%;padding:0.3rem 1.6rem}pn-marketweb-header-main-row .siteheader-menu [slot=top] pn-search-field{width:100%}pn-marketweb-header-main-row .siteheader-menu nav.mainnav[data-menu-open=true]>pn-mainnav-level[data-level=\"1\"]{display:block;margin-top:0;height:calc(100dvh - 0);overflow-y:auto;-webkit-overflow-scrolling:touch}pn-marketweb-header-main-row .siteheader-mainnav-groups{display:flex;flex-direction:column}pn-marketweb-header-main-row .siteheader-mainnav-list{overflow:visible}pn-marketweb-header-main-row .siteheader-mainnav-divider{display:none}pn-marketweb-header-main-row .siteheader-menu-footer{display:flex;flex-direction:column;align-items:center}pn-marketweb-header-main-row .siteheader-menu-footer>*{margin:1.6rem}body[data-siteheader-menuopen=false] pn-marketweb-header-main-row .siteheader-mobile-logo,body:not([data-siteheader-menuopen]) pn-marketweb-header-main-row .siteheader-mobile-logo{display:flex}body[data-siteheader-menuopen=false] pn-marketweb-header-main-row .siteheader-mobile-menu-toggle,body:not([data-siteheader-menuopen]) pn-marketweb-header-main-row .siteheader-mobile-menu-toggle{display:none}body[data-siteheader-menuopen=true] pn-marketweb-header-main-row .siteheader-mobile-logo{display:none}body[data-siteheader-menuopen=true] pn-marketweb-header-main-row .siteheader-mobile-menu-toggle{display:flex}@media screen and (min-width: 769px){pn-marketweb-header-main-row .siteheader-row-main{background-color:var(--siteheader-main-row-bg-tablet, transparent)}pn-marketweb-header-main-row .siteheader-mobile-left{display:none}pn-marketweb-header-main-row .siteheader-mainnav-middle{display:flex;margin-left:auto}pn-marketweb-header-main-row .siteheader-mainnav-menu{justify-content:flex-start}pn-marketweb-header-main-row .siteheader-mainnav-menu>[slot=mobile-toprightend]{display:none}pn-marketweb-header-main-row .siteheader-menu-footer{display:none}body[data-siteheader-menuopen=false] pn-marketweb-header-main-row .siteheader-mobile-logo,body:not([data-siteheader-menuopen]) pn-marketweb-header-main-row .siteheader-mobile-logo,body[data-siteheader-menuopen=true] pn-marketweb-header-main-row .siteheader-mobile-logo{display:flex}body[data-siteheader-menuopen=false] pn-marketweb-header-main-row .siteheader-mobile-menu-toggle,body:not([data-siteheader-menuopen]) pn-marketweb-header-main-row .siteheader-mobile-menu-toggle,body[data-siteheader-menuopen=true] pn-marketweb-header-main-row .siteheader-mobile-menu-toggle{display:none}}@media screen and (min-width: 1024px){pn-marketweb-header-main-row .siteheader-mainnav-groups{display:inline-flex;flex-direction:row;align-items:stretch;vertical-align:top}pn-marketweb-header-main-row .siteheader-mainnav-middle{order:3;margin-left:1.6rem}pn-marketweb-header-main-row .siteheader-mainnav-menu{order:2}pn-marketweb-header-main-row .siteheader-menu{margin-top:auto;overflow:visible}pn-marketweb-header-main-row .siteheader-menu nav.mainnav[data-menu-open=true]>pn-mainnav-level[data-level=\"1\"]{margin-top:0;height:auto;overflow-y:visible}pn-marketweb-header-main-row .siteheader-mainnav-list{display:inline-flex;align-items:stretch;vertical-align:top}pn-marketweb-header-main-row .siteheader-mainnav-divider{display:inline-flex;align-self:center;width:1px;min-height:4rem;margin:0 0.8rem;background:var(--siteheader-mainnav-divider-color, #d3cecb)}}";
const PnMarketwebHeaderMainRowStyle0 = pnMarketwebHeaderMainRowCss;

const PnMarketwebHeaderMainRow = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.vm = undefined;
        this.i18n = undefined;
        this.market = undefined;
        this.language = undefined;
        this.siteid = undefined;
        this.hideSearch = undefined;
        this.hideLogin = undefined;
        this.hideLanguageSelector = undefined;
        this.hideSiteSelector = undefined;
        this.minimizeSearch = undefined;
        this.activeMenuMode = undefined;
        this.navigateOnMenuToggle = undefined;
        this.primaryItems = undefined;
        this.sharedItems = undefined;
        this.showMenuDivider = undefined;
        this.userToken = undefined;
        this.userFullname = undefined;
        this.userLoggedin = undefined;
        this.endpoint = undefined;
        this.environment = undefined;
        this.showProfileSelection = undefined;
        this.showUnifiedLogin = undefined;
        this.checkUserLoggedInStateInterval = undefined;
        this.useMarketwebLogin = undefined;
        this.spaMode = undefined;
        this.theme = undefined;
        this.logoUrl = undefined;
        this.menuToggleChangeHandler = undefined;
        this.mainNavRefHandler = undefined;
        this.adjustSiteSelectorUrl = undefined;
    }
    renderMenuLink(item) {
        return (index.h("pn-mainnav-link", { name: item.name, href: item.href, itemid: item.id, target: item.linkTarget ?? '_self', linkid: item.trackingId }, ((item.promotedMenuItems && item.promotedMenuItems.length > 0) || (item.children && item.children.length > 0)) && (index.h("pn-mainnav-level", { label: item.name }, !!item.children?.length && (index.h("pn-mainnav-list", { heading: item.navigationHeading ?? '' }, item.children.map(childitem => (index.h("pn-mainnav-link", { name: childitem.name, href: childitem.href, target: childitem.linkTarget ?? '_self', linkid: childitem.trackingId }))))), !!item.promotedMenuItems?.length && (index.h("pn-mainnav-list", { heading: item.promotedMenuItemsHeader }, item.promotedMenuItems.map((childitem) => (index.h("pn-mainnav-link", { href: childitem.href, name: childitem.linkText, target: childitem.openInNewWindow ? '_blank' : '_self', linkid: headerTheme.promotedItemId(childitem) + item.id })))))))));
    }
    renderMenuLinks(items) {
        return items.map(item => this.renderMenuLink(item));
    }
    renderGroupedMenuLists(primaryItems, sharedItems) {
        const hasPrimaryItems = primaryItems.length > 0;
        const hasSharedItems = sharedItems.length > 0;
        const hasDivider = hasPrimaryItems && hasSharedItems;
        return index.h("div", { class: "siteheader-mainnav-groups" }, hasPrimaryItems ? (index.h("pn-mainnav-list", { class: "siteheader-mainnav-list siteheader-mainnav-list-primary" }, this.renderMenuLinks(primaryItems))) : null, hasDivider ? (index.h("div", { class: "siteheader-mainnav-divider", "aria-hidden": "true" })) : null, hasSharedItems ? (index.h("pn-mainnav-list", { class: "siteheader-mainnav-list siteheader-mainnav-list-shared" }, this.renderMenuLinks(sharedItems))) : null);
    }
    renderMenuFooter(appearance) {
        return (index.h("div", { slot: "footer", class: "siteheader-menu-footer" }, index.h("slot", { name: "menu-footer-cta" }), renderHeaderLogin({
            vm: this.vm,
            hideLogin: this.hideLogin,
            userToken: this.userToken,
            userFullname: this.userFullname,
            userLoggedin: this.userLoggedin,
            endpoint: this.endpoint,
            environment: this.environment,
            i18n: this.i18n,
            showProfileSelection: this.showProfileSelection,
            showUnifiedLogin: this.showUnifiedLogin,
            checkUserLoggedInStateInterval: this.checkUserLoggedInStateInterval,
            useMarketwebLogin: this.useMarketwebLogin,
            appearance
        }), renderHeaderLanguageSelector({
            vm: this.vm,
            hideLanguageSelector: this.hideLanguageSelector,
            language: this.language,
            spaMode: this.spaMode,
            appearance
        }), renderHeaderSiteSelector({
            vm: this.vm,
            hideSiteSelector: this.hideSiteSelector,
            language: this.language,
            appearance,
            adjustSiteSelectorUrl: this.adjustSiteSelectorUrl,
        })));
    }
    render() {
        // main row's subcomponent have light appearance even if business theme, since white bg
        const appearance = 'light';
        return (index.h("div", { key: '6569068aa71f831c64d80ae49841c52c422aafee', class: "siteheader-row siteheader-row-main" }, index.h("div", { key: 'd80d94ad7d42ad0e6dd4f17793470e3b99e1259b', class: "siteheader-mobile-left" }, index.h("div", { key: '8f15ec3f0912eff80b9b2b1b5110f9d8d5be340b', class: "siteheader-mobile-logo" }, renderHeaderLogo({
            homePageLink: this.logoUrl, //this.vm.homePageLink,
            homeLabel: this.i18n.home,
        })), this.vm.hasMenuSwitching && (index.h("div", { key: 'cd7e5b59db027518655aa6b64ca7d41c50439df8', class: "siteheader-mobile-menu-toggle" }, renderHeaderMenuSwitcher({
            vm: this.vm,
            activeMenuMode: this.activeMenuMode,
            navigateOnMenuToggle: this.navigateOnMenuToggle,
            onMenuToggleChange: this.menuToggleChangeHandler,
        })))), index.h("div", { key: '1e1602ae9fa7a24e67c4210c349fa11c647cbc61', class: "siteheader-mainnav-middle" }, index.h("pn-marketweb-siteheader-search", { key: '56b70f0de0d1eb0818f9be8b29f6aab4a33436ce', language: this.language, siteid: this.siteid, primary: true, search: this.vm.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n }), index.h("slot", { key: '3a2a912c7578588245a306e0a69b19ba4fe6f07b', name: "header-bottom-button" })), index.h("div", { key: '950031e00ce843cb258fe41a019d2d291484355e', class: "siteheader-mainnav-menu" }, index.h("slot", { key: '5d162a549fa86c35ae1df1a70d8fa891676115c9', name: "mobile-toprightend" }), index.h("div", { key: '590c867a2b6c21b32677583050455464ec3d7256', class: "siteheader-menu" }, index.h("pn-mainnav", { key: '22e04f8724b186aa428ec79f1779b79c9c4fdaa0', ref: el => {
                this.mainNavRefHandler(el);
            }, market: this.market, language: this.language, onMenuOpenChange: e => {
                document.body.setAttribute('data-siteheader-menuopen', String(e.detail));
            } }, index.h("pn-mainnav-level", { key: '67a41d3f1fda939b23f8115fa8a0358f75f44422' }, this.showMenuDivider ? (this.renderGroupedMenuLists(this.primaryItems, this.sharedItems)) : (index.h("pn-mainnav-list", null, this.renderMenuLinks(this.primaryItems))), this.renderMenuFooter(appearance), index.h("div", { key: 'f4c378b80d938530e5fe28bbedb48c080f4edb35', slot: "top", class: "siteheader-menu-top" }, index.h("pn-marketweb-siteheader-search", { key: '7dd680e6a0e3286e988b86d27e2d916e29171e98', language: this.language, siteid: this.siteid, search: this.vm.search, "hide-search": this.hideSearch, i18n: this.i18n }))))))));
    }
};
PnMarketwebHeaderMainRow.style = PnMarketwebHeaderMainRowStyle0;

const pnMarketwebHeaderTopRowCss = "pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-marketweb-header-top-row{display:contents}pn-marketweb-header-top-row .siteheader-row-top{border-bottom:0.1rem solid var(--siteheader-top-row-border-color, #f3f2f2);color:var(--siteheader-top-text-color, var(--siteheader-text-color, inherit));background-color:var(--siteheader-top-row-bg, transparent)}pn-marketweb-header-top-row .siteheader-topleft{display:flex;align-items:center;min-width:0;gap:0.8rem}pn-marketweb-header-top-row .siteheader-topleft pn-marketweb-header-toggle{display:flex;align-items:center;margin-left:1rem}pn-marketweb-header-top-row .siteheader-topleft pn-site-selector{display:none;padding:1rem 0;margin-left:0}pn-marketweb-header-top-row .siteheader-topright{display:flex;flex-direction:row;align-items:center;min-width:0;margin-right:0}pn-marketweb-header-top-row .siteheader-topright>pn-language-selector,pn-marketweb-header-top-row .siteheader-topright>pn-marketweb-siteheader-login,pn-marketweb-header-top-row .siteheader-topright>a,pn-marketweb-header-top-row .siteheader-topright>button,pn-marketweb-header-top-row .siteheader-topright>[slot=header-top-right-start],pn-marketweb-header-top-row .siteheader-topright>[slot=toprightend]{display:none;align-self:center;padding:1rem 0;margin-left:0;color:var(--siteheader-top-link-color, inherit)}pn-marketweb-header-top-row .siteheader-menu-top-search{display:none}@media screen and (min-width: 769px){pn-marketweb-header-top-row .siteheader-topleft pn-site-selector{display:block}pn-marketweb-header-top-row .siteheader-topright>pn-language-selector,pn-marketweb-header-top-row .siteheader-topright>pn-marketweb-siteheader-login,pn-marketweb-header-top-row .siteheader-topright>a,pn-marketweb-header-top-row .siteheader-topright>button,pn-marketweb-header-top-row .siteheader-topright>[slot=header-top-right-start],pn-marketweb-header-top-row .siteheader-topright>[slot=toprightend]{display:block;margin-left:1rem}}@media screen and (min-width: 1024px){pn-marketweb-header-top-row .siteheader-topleft pn-marketweb-header-toggle{margin-left:1.6rem}pn-marketweb-header-top-row .siteheader-topleft pn-site-selector{margin-left:1.3rem}pn-marketweb-header-top-row .siteheader-logocontainer{min-height:3em;position:absolute;left:50%;transform:translateX(-50%)}pn-marketweb-header-top-row .siteheader-topright{margin-right:1.6rem}pn-marketweb-header-top-row .siteheader-topright>pn-language-selector,pn-marketweb-header-top-row .siteheader-topright>pn-marketweb-siteheader-login,pn-marketweb-header-top-row .siteheader-topright>a,pn-marketweb-header-top-row .siteheader-topright>button,pn-marketweb-header-top-row .siteheader-topright>[slot=header-top-right-start],pn-marketweb-header-top-row .siteheader-topright>[slot=toprightend]{margin-left:1.6rem}}";
const PnMarketwebHeaderTopRowStyle0 = pnMarketwebHeaderTopRowCss;

const PnMarketwebHeaderTopRow = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.vm = undefined;
        this.i18n = undefined;
        this.language = undefined;
        this.siteid = undefined;
        this.endpoint = undefined;
        this.environment = undefined;
        this.userToken = undefined;
        this.userFullname = undefined;
        this.userLoggedin = undefined;
        this.hideSiteSelector = undefined;
        this.hideLanguageSelector = undefined;
        this.hideSearch = undefined;
        this.hideLogin = undefined;
        this.showProfileSelection = undefined;
        this.showUnifiedLogin = undefined;
        this.spaMode = undefined;
        this.checkUserLoggedInStateInterval = undefined;
        this.useMarketwebLogin = undefined;
        this.activeMenuMode = undefined;
        this.navigateOnMenuToggle = undefined;
        this.theme = undefined;
        this.logoUrl = undefined;
        this.menuToggleChangeHandler = undefined;
        this.adjustSiteSelectorUrl = undefined;
    }
    render() {
        const appearance = headerTheme.getAppearanceForTheme(this.theme);
        return (index.h("div", { key: '6dae77d3315a7697c3f75e310cef8632f277a08f', class: "siteheader-row siteheader-row-top" }, index.h("div", { key: 'b3eb662b1f9057ed750e585a31e2b06c05f5c925', class: "siteheader-topleft" }, index.h("slot", { key: 'ff34efaa83b0429de351e704eb04a31fd9f5259a', name: "header-top-left" }), renderHeaderSiteSelector({
            vm: this.vm,
            hideSiteSelector: this.hideSiteSelector,
            language: this.language,
            buttonText: this.vm.siteSelector?.currentSiteTitle ?? 'postnord',
            appearance,
            adjustSiteSelectorUrl: this.adjustSiteSelectorUrl,
        }), renderHeaderMenuSwitcher({
            vm: this.vm,
            activeMenuMode: this.activeMenuMode,
            navigateOnMenuToggle: this.navigateOnMenuToggle,
            onMenuToggleChange: this.menuToggleChangeHandler,
        })), renderHeaderLogo({
            homePageLink: this.logoUrl, //this.vm.homePageLink,
            homeLabel: this.i18n.home,
        }), index.h("div", { key: '6efe812bcda3ef96ab6a06d7aa8c7a41150a509b', class: "siteheader-topright" }, index.h("slot", { key: '5b8834f095b01c52bab5f6134ebf9d26f048cfc1', name: "header-top-right-start" }), renderHeaderLogin({
            vm: this.vm,
            hideLogin: this.hideLogin,
            userToken: this.userToken,
            userFullname: this.userFullname,
            userLoggedin: this.userLoggedin,
            endpoint: this.endpoint,
            environment: this.environment,
            i18n: this.i18n,
            showProfileSelection: this.showProfileSelection,
            showUnifiedLogin: this.showUnifiedLogin,
            checkUserLoggedInStateInterval: this.checkUserLoggedInStateInterval,
            useMarketwebLogin: this.useMarketwebLogin,
            appearance
        }), renderHeaderLanguageSelector({
            vm: this.vm,
            hideLanguageSelector: this.hideLanguageSelector,
            language: this.language,
            spaMode: this.spaMode,
            appearance
        }), index.h("slot", { key: '76c5fdb2fc354c09532d23bbd01063460006795c', name: "toprightend" }), index.h("div", { key: '44ec76b8051220fc7b56115247c431e7533c8d0f', class: "siteheader-menu-top-search" }, index.h("pn-marketweb-siteheader-search", { key: '2fe35c9ec19f6f19a81c06aa15f6b9423bf1a5fb', language: this.language, siteid: this.siteid, search: this.vm.search, "hide-search": this.hideSearch, i18n: this.i18n, icononly: true })))));
    }
};
PnMarketwebHeaderTopRow.style = PnMarketwebHeaderTopRowStyle0;

exports.pn_marketweb_header_main_row = PnMarketwebHeaderMainRow;
exports.pn_marketweb_header_top_row = PnMarketwebHeaderTopRow;

//# sourceMappingURL=pn-marketweb-header-main-row_2.cjs.entry.js.map