import { h, Host } from "@stencil/core";
import { translations } from "./translations";
import { angle_down, angle_up } from "pn-design-assets/pn-assets/icons";
export class PnCustomernumberSelector {
    constructor() {
        this.language = 'sv';
        this.open = false;
        this.heading = '';
        this.description = '';
        this.i18n = translations['en'];
    }
    hostElement;
    componentWillLoad() {
        this.init();
    }
    init() {
        this.setTranslations();
    }
    setTranslations() {
        if (this.language && translations[this.language]) {
            this.i18n = translations[this.language];
        }
    }
    render() {
        return (h(Host, { key: 'bbd904651e0633f63710fb35c55a2111d5d11b6d' }, h("div", { key: '1886681049eeb333415707e03fd0be499d6c8a23', class: "customernumber-container" }, h("button", { key: '4d19bb8b8db7572bc458789a9f8b29cb7997271f', class: "customernumber-toggle", "aria-label": this.i18n.toggleLinkTitleText, onClick: () => (this.open = !this.open) }, h("div", { key: 'f6f279cebff751b9e2dff23d20f549fb45e08e94', class: "customernumber-selected" }, h("strong", { key: '8559bcaca559b178eca30bcc369801fdf7de13fc', class: "customernumber-selected-title" }, this.heading), h("div", { key: '4da037f182af3504e48dde62ccd34f1f92061589', class: "customernumber-selected-description" }, this.description)), h("pn-icon", { key: 'e07f3077cc6e42a2f8439952ab892d978bb47da9', icon: this.open ? angle_up : angle_down, small: "false", color: "blue700" })), h("div", { key: '51e476f711faea616d1943d47223f3e2a1393bad', class: "customernumber-options" }, h("slot", { key: 'b8dcd760530fedfe50fb5bc17be55e0d296e8668' })))));
    }
    static get is() { return "pn-customernumber-selector"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-customernumber-selector.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-customernumber-selector.css"]
        };
    }
    static get properties() {
        return {
            "language": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "language",
                "reflect": true,
                "defaultValue": "'sv'"
            },
            "open": {
                "type": "boolean",
                "mutable": true,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "open",
                "reflect": true,
                "defaultValue": "false"
            },
            "heading": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "heading",
                "reflect": false,
                "defaultValue": "''"
            },
            "description": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "description",
                "reflect": false,
                "defaultValue": "''"
            }
        };
    }
    static get states() {
        return {
            "i18n": {}
        };
    }
    static get elementRef() { return "hostElement"; }
}
//# sourceMappingURL=pn-customernumber-selector.js.map
