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: 'b640ec27088cbff1fefcd079a84ac42505aff646', 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: '390e0f6e814ebe41e163650eb3a4e92cad9cbd8e', class: Object.assign({}, innerBlock.class()) }, h("div", { key: '72c9ae70c27cfe8717358e0effcc210d76573146', class: Object.assign({}, block.element('container').class()) }, h("slot", { key: 'b195f883a809c0e65513a81bb33715da46e1bfa1' })))));
    }
    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;
