import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { a as angle_small_down } from './angle_small_down.js';

const languageData = {
  sv: {
    navlabel: 'Webbplatsväljare',
  },
  en: {
    navlabel: 'Website selector',
  },
  da: {
    navlabel: 'Webstedsvælger',
  },
  no: {
    navlabel: 'Nettstedsvelger',
  },
  fi: {
    navlabel: 'Verkkosivun valitsin',
  },
  de: {
    navlabel: 'Website-Selektor',
  },
};

const pnSiteSelectorCss = "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-site-selector{--siteselector-heading-color:#000000;--siteselector-description-color:#2d2013;--siteselector-hover-background-color:#f3f2f2;--siteselector-hover-text-color:#005d92;--siteselector-active-text-color:#00a0d6;--siteselector-item-title-color:#2d2013;--siteselector-item-link-color:#005d92}pn-site-selector{display:flex;position:relative;justify-content:center;max-height:5.2rem}@media screen and (min-width: 75em){pn-site-selector{display:block}}.siteselector-heading{display:block;padding:0;margin-bottom:1.6rem;color:var(--siteselector-heading-color)}@media screen and (min-width: 75em){.siteselector-heading{display:flex;align-items:center;margin-top:0.8rem}}.siteselector-list{list-style:none;margin:0;padding:0}pn-site-selector[appearance=dark] button:hover pn-icon svg path{fill:#000000}";
const PnSiteSelectorStyle0 = pnSiteSelectorCss;

const PnSiteSelector = /*@__PURE__*/ proxyCustomElement(class PnSiteSelector extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.buttontext = 'postnord';
        this.heading = 'PostNord';
        this.language = 'sv';
        this.appearance = 'light';
        this.i18n = { navlabel: 'Site selector' };
    }
    get hostElement() { return this; }
    componentWillLoad() {
        this.setLanguage();
    }
    setLanguage() {
        if (languageData[this.language]) {
            this.i18n = languageData[this.language];
        }
    }
    render() {
        return (h(Host, { key: '475423951cea0f0c5f79433c523a6badfdc9f75b' }, h("pn-button-dropdown", { key: 'ec59499056be6e43eb44174fca7e961814fd92b2', label: this.buttontext, icon: angle_small_down, appearance: this.appearance, variant: "borderless", "aria-label": this.i18n.navlabel }, h("div", { key: '21530f0e90b86b8c61e3f7001d603a12eec154bb', class: "siteselector-nav" }, this.heading ? h("strong", { class: "siteselector-heading" }, this.heading) : null, h("div", { key: 'b3835279e816311acbc58c2e22ca252b0ea0f67c', role: "menu", class: "siteselector-list" }, h("slot", { key: '6cab81e8edcb474db69fa4d8be355368630dc2f7' }))))));
    }
    static get style() { return PnSiteSelectorStyle0; }
}, [4, "pn-site-selector", {
        "buttontext": [1537],
        "heading": [1537],
        "language": [1537],
        "appearance": [1537],
        "i18n": [32]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["pn-site-selector"];
    components.forEach(tagName => { switch (tagName) {
        case "pn-site-selector":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, PnSiteSelector);
            }
            break;
    } });
}

export { PnSiteSelector as P, defineCustomElement as d };

//# sourceMappingURL=pn-site-selector2.js.map