import { h, Host } from "@stencil/core";
import state from "./pn-sidenav-store";
import { close_small, bars } from "pn-design-assets/pn-assets/icons";
export class PnSidenavTogglebutton {
    constructor() {
        this.label = '';
        this.i18n = { open: '', close: '', navLabel: '' };
    }
    hostElement;
    onClick() {
        state.openMenu = !state.openMenu;
        const body = document.querySelector('body');
        body.setAttribute('data-siteheader-sidemenuopen', state.openMenu + '');
    }
    render() {
        return (h(Host, { key: '444f5c04c57aca3e2881615f1c3236c81bd60486' }, h("pn-button", { key: '2f19f74d213b2de945a48ce43dc0673e62ced181', appearance: "light", icon: state.openMenu ? close_small : bars, "left-icon": true, small: true, onclick: this.onClick.bind(this), label: this.label }, h("slot", { key: '3e0c702be8d037fb0fcb23b6eff3dd78689383e6' }))));
    }
    static get is() { return "pn-sidenav-togglebutton"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-sidenav-togglebutton.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-sidenav-togglebutton.css"]
        };
    }
    static get properties() {
        return {
            "label": {
                "type": "string",
                "mutable": false,
                "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": "label",
                "reflect": false,
                "defaultValue": "''"
            }
        };
    }
    static get states() {
        return {
            "i18n": {}
        };
    }
    static get elementRef() { return "hostElement"; }
}
//# sourceMappingURL=pn-sidenav-togglebutton.js.map
