import { h, } from "@stencil/core";
import { getAppearanceForTheme, } from "../utils/header-theme";
import { renderHeaderLanguageSelector, renderHeaderLogin, renderHeaderLogo, renderHeaderMenuSwitcher, renderHeaderSiteSelector, } from "./shared/pn-marketweb-header-shared";
export class PnMarketwebHeaderTopRow {
    constructor() {
        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 = getAppearanceForTheme(this.theme);
        return (h("div", { key: '6dae77d3315a7697c3f75e310cef8632f277a08f', class: "siteheader-row siteheader-row-top" }, h("div", { key: 'b3eb662b1f9057ed750e585a31e2b06c05f5c925', class: "siteheader-topleft" }, 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,
        }), h("div", { key: '6efe812bcda3ef96ab6a06d7aa8c7a41150a509b', class: "siteheader-topright" }, 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
        }), h("slot", { key: '76c5fdb2fc354c09532d23bbd01063460006795c', name: "toprightend" }), h("div", { key: '44ec76b8051220fc7b56115247c431e7533c8d0f', class: "siteheader-menu-top-search" }, 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 })))));
    }
    static get is() { return "pn-marketweb-header-top-row"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-marketweb-header-top-row.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-marketweb-header-top-row.css"]
        };
    }
    static get properties() {
        return {
            "vm": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "HeaderViewModel",
                    "resolved": "HeaderViewModel",
                    "references": {
                        "HeaderViewModel": {
                            "location": "import",
                            "path": "../types/pn-marketweb-header.types",
                            "id": "src/components/layout-components/pn-marketweb-header/types/pn-marketweb-header.types.ts::HeaderViewModel"
                        }
                    }
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                }
            },
            "i18n": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "SiteHeaderI18N",
                    "resolved": "SiteHeaderI18N",
                    "references": {
                        "SiteHeaderI18N": {
                            "location": "import",
                            "path": "../../pn-marketweb-siteheader/pn-marketweb-siteheader-types",
                            "id": "src/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.ts::SiteHeaderI18N"
                        }
                    }
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                }
            },
            "language": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "language",
                "reflect": false
            },
            "siteid": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "siteid",
                "reflect": false
            },
            "endpoint": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "endpoint",
                "reflect": false
            },
            "environment": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "environment",
                "reflect": false
            },
            "userToken": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "user-token",
                "reflect": false
            },
            "userFullname": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "user-fullname",
                "reflect": false
            },
            "userLoggedin": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "user-loggedin",
                "reflect": false
            },
            "hideSiteSelector": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "hide-site-selector",
                "reflect": false
            },
            "hideLanguageSelector": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "hide-language-selector",
                "reflect": false
            },
            "hideSearch": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "hide-search",
                "reflect": false
            },
            "hideLogin": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "hide-login",
                "reflect": false
            },
            "showProfileSelection": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "show-profile-selection",
                "reflect": false
            },
            "showUnifiedLogin": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "show-unified-login",
                "reflect": false
            },
            "spaMode": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "spa-mode",
                "reflect": false
            },
            "checkUserLoggedInStateInterval": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "check-user-logged-in-state-interval",
                "reflect": false
            },
            "useMarketwebLogin": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "use-marketweb-login",
                "reflect": false
            },
            "activeMenuMode": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "HeaderMenuMode",
                    "resolved": "number",
                    "references": {
                        "HeaderMenuMode": {
                            "location": "import",
                            "path": "../types/pn-marketweb-header.types",
                            "id": "src/components/layout-components/pn-marketweb-header/types/pn-marketweb-header.types.ts::HeaderMenuMode"
                        }
                    }
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "active-menu-mode",
                "reflect": false
            },
            "navigateOnMenuToggle": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "navigate-on-menu-toggle",
                "reflect": false
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "HeaderTheme",
                    "resolved": "\"business\" | \"private\"",
                    "references": {
                        "HeaderTheme": {
                            "location": "import",
                            "path": "../utils/header-theme",
                            "id": "src/components/layout-components/pn-marketweb-header/utils/header-theme.ts::HeaderTheme"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false
            },
            "logoUrl": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "logo-url",
                "reflect": false
            },
            "menuToggleChangeHandler": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "(e: CustomEvent<HeaderMenuMode>) => void",
                    "resolved": "(e: CustomEvent<number>) => void",
                    "references": {
                        "CustomEvent": {
                            "location": "global",
                            "id": "global::CustomEvent"
                        },
                        "HeaderMenuMode": {
                            "location": "import",
                            "path": "../types/pn-marketweb-header.types",
                            "id": "src/components/layout-components/pn-marketweb-header/types/pn-marketweb-header.types.ts::HeaderMenuMode"
                        }
                    }
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                }
            },
            "adjustSiteSelectorUrl": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "(href: string) => string",
                    "resolved": "(href: string) => string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                }
            }
        };
    }
}
//# sourceMappingURL=pn-marketweb-header-top-row.js.map
