import { __decorate, __metadata } from "tslib";
import { Host, h } from "@stencil/core";
import { BEM } from "../../../utils/bem";
import { Logger } from "../../../utils/log";
export class NavMenuBar {
    constructor() {
        this.navMenuBarId = `bal-nav-menu-bar-${NavMenuBarIds++}`;
        this.isHidden = false;
        /**
         * PUBLIC PROPERTY API
         * ------------------------------------------------------
         */
        /**
         * Tells when to hide the bar
         */
        this.invisible = 'none';
        /**
         * Defines the position of the bar
         */
        this.position = 'none';
    }
    createLogger(log) {
        this.log = log;
    }
    /**
     * GETTERS
     * ------------------------------------------------------
     */
    get flyoutElement() {
        return this.el.querySelector('bal-nav-menu-flyout');
    }
    /**
     * RENDER
     * ------------------------------------------------------
     */
    render() {
        const block = BEM.block('nav-menu-bar');
        const innerBlock = block.element('inner');
        return (h(Host, { key: 'c512c5c56732da21be09b4f425cadf3e59cd42f9', id: this.navMenuBarId, class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier(`hidden-mobile`).class(this.invisible === 'mobile')), block.modifier(`hidden-tablet`).class(this.invisible === 'tablet')), block.modifier(`position-${this.position}`).class(this.position !== 'none')) }, h("div", { key: '79c4e0d458b0a7ced671b8fe9268d10748f676f8', class: Object.assign({}, innerBlock.class()) }, h("div", { key: '565d5c9f36f2e1d835f1e918308d7b4435cf650a', class: Object.assign({}, block.element('container').class()) }, h("slot", { key: 'ab610c474c6c6a9e1b15036a298aa3b273ae4207' })))));
    }
    static get is() { return "bal-nav-menu-bar"; }
    static get originalStyleUrls() {
        return {
            "$": ["bal-nav-menu-bar.sass"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bal-nav-menu-bar.css"]
        };
    }
    static get properties() {
        return {
            "invisible": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalNavMenuBarInvisible",
                    "resolved": "\"mobile\" | \"none\" | \"tablet\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Tells when to hide the bar"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "invisible",
                "defaultValue": "'none'"
            },
            "position": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalNavMenuBarPosition",
                    "resolved": "\"fixed-top\" | \"none\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the position of the bar"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "position",
                "defaultValue": "'none'"
            }
        };
    }
    static get states() {
        return {
            "isHidden": {}
        };
    }
    static get elementRef() { return "el"; }
}
__decorate([
    Logger('bal-nav-menu-bar'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Function]),
    __metadata("design:returntype", void 0)
], NavMenuBar.prototype, "createLogger", null);
let NavMenuBarIds = 0;
