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: 'c2ea73c8876d06127c4fee24edf6a2ecc623f199', 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: 'd59d5d00f628748b91964b61692cca01d609a005', class: Object.assign({}, innerBlock.class()) }, h("div", { key: '3afd6861fef7c4d6e2b3d41bd7e626daa4aa06b1', class: Object.assign({}, block.element('container').class()) }, h("slot", { key: '380e064513ba797a10145e73bdc76dfe81dafaf6' })))));
    }
    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;
