import { angle_small_down } from "pn-design-assets/pn-assets/icons.js";
import { h, Host, } from "@stencil/core";
import languageData from "./pn-site-selector-i18n";
export class PnSiteSelector {
    constructor() {
        this.buttontext = 'postnord';
        this.heading = 'PostNord';
        this.language = 'sv';
        this.appearance = 'light';
        this.i18n = { navlabel: 'Site selector' };
    }
    hostElement;
    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 is() { return "pn-site-selector"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-site-selector.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-site-selector.css"]
        };
    }
    static get properties() {
        return {
            "buttontext": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "buttontext",
                "reflect": true,
                "defaultValue": "'postnord'"
            },
            "heading": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "heading",
                "reflect": true,
                "defaultValue": "'PostNord'"
            },
            "language": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Specifies which language we want to show navigation in (sv,da,fi,no,en)"
                },
                "attribute": "language",
                "reflect": true,
                "defaultValue": "'sv'"
            },
            "appearance": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "'light' | 'dark'",
                    "resolved": "\"dark\" | \"light\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "appearance",
                "reflect": true,
                "defaultValue": "'light'"
            }
        };
    }
    static get states() {
        return {
            "i18n": {}
        };
    }
    static get elementRef() { return "hostElement"; }
}
//# sourceMappingURL=pn-site-selector.js.map
