'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-9a9efa1c.js');
const pnSidenavStore = require('./pn-sidenav-store-41848c2e.js');
const bars = require('./bars-3fdeb31f.js');
const close_small = require('./close_small-cd4578e1.js');
require('./index-a8de2b09.js');

const pnSidenavTogglebuttonCss = "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-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#effbff}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";
const PnSidenavTogglebuttonStyle0 = pnSidenavTogglebuttonCss;

const PnSidenavTogglebutton = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.label = '';
        this.i18n = { open: '', close: '', navLabel: '' };
    }
    get hostElement() { return index.getElement(this); }
    onClick() {
        pnSidenavStore.state.openMenu = !pnSidenavStore.state.openMenu;
        const body = document.querySelector('body');
        body.setAttribute('data-siteheader-sidemenuopen', pnSidenavStore.state.openMenu + '');
    }
    render() {
        return (index.h(index.Host, { key: '444f5c04c57aca3e2881615f1c3236c81bd60486' }, index.h("pn-button", { key: '2f19f74d213b2de945a48ce43dc0673e62ced181', appearance: "light", icon: pnSidenavStore.state.openMenu ? close_small.close_small : bars.bars, "left-icon": true, small: true, onclick: this.onClick.bind(this), label: this.label }, index.h("slot", { key: '3e0c702be8d037fb0fcb23b6eff3dd78689383e6' }))));
    }
};
PnSidenavTogglebutton.style = PnSidenavTogglebuttonStyle0;

exports.pn_sidenav_togglebutton = PnSidenavTogglebutton;

//# sourceMappingURL=pn-sidenav-togglebutton.cjs.entry.js.map