import { __decorate, __metadata } from "tslib";
import { h, Host } 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: '1d3156e1e56a298106c03aa04a7ce6e7e720fa09', 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: '1e1855a00bf27d97cd6740bbf1bf6c27b688b8fd', class: Object.assign({}, innerBlock.class()) }, h("div", { key: '96ada15dbc1e40a0f364d05de09692c483a57c44', class: Object.assign({}, block.element('container').class()) }, h("slot", { key: '1a3229dd01d5da1cfc3e9ff15ae995ddd6fb2c93' })))));
    }
    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",
                "attribute": "invisible",
                "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,
                "defaultValue": "'none'"
            },
            "position": {
                "type": "string",
                "attribute": "position",
                "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,
                "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;
