'use strict';

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

const __chunk_1 = require('./chunk-2755df65.js');
require('./chunk-f5b13333.js');
const __chunk_3 = require('./chunk-451ee4a2.js');

class TabHeader {
    constructor(hostRef) {
        __chunk_1.registerInstance(this, hostRef);
        this.id = __chunk_3.Util.getUUID();
        this.isSelected = false;
        this.onSelect = __chunk_1.createEvent(this, "onSelect", 7);
    }
    async getChild() {
        return {
            select: this.select.bind(this),
            unselect: this.unselect.bind(this),
            name: this.name,
            id: this.id
        };
    }
    unselect() {
        this.isSelected = false;
    }
    select() {
        this.isSelected = true;
    }
    async onClick() {
        this.onSelect.emit(await this.getChild());
    }
    render() {
        const classes = {
            'ema-tab-header': true,
            'ema-tab-header-selected': this.isSelected
        };
        return [
            __chunk_1.h("div", { class: classes, onClick: this.onClick.bind(this) }, __chunk_1.h("slot", null)),
        ];
    }
    static get style() { return ":root{--ema-color:#343a40;--ema-primary:#007bff;--ema-secondary:#6c757d;--ema-success:#28a745;--ema-info:#17a2b8;--ema-warning:#ffc107;--ema-danger:#dc3545;--ema-light:#f8f9fa;--ema-dark:#343a40;--ema-background:#fff;--ema-background-diap:rgba(29,29,29,0.97);--ema-border-color:#c5c9cd;--ema-border:1px solid #c5c9cd;--ema-border-radius:3px 3px 3px 3px;--ema-box-shadow:1px 1px 10px 1px #ccc;--ema-margin:0.25rem;--ema-margin-sm:0.5rem;--ema-margin-md:1rem;--ema-margin-lg:1.5rem;--ema-margin-xl:2rem;--ema-padding:0.25rem;--ema-padding-sm:0.5rem;--ema-padding-md:1rem;--ema-padding-lg:1.5rem;--ema-padding-xl:2rem;--ema-gray-100:#f8f9fa;--ema-gray-200:#e9ecef;--ema-gray-300:#dee2e6;--ema-gray-400:#ced4da;--ema-gray-500:#adb5bd;--ema-gray-600:#868e96;--ema-gray-700:#495057;--ema-gray-800:#343a40;--ema-gray-900:#212529}.ema-tab-header{min-height:40px;min-width:150px;padding:5px;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-bottom:2px solid transparent}\@media (max-width:599px){.ema-tab-header{min-width:100px}}.ema-tab-header-selected{border-bottom:2px solid var(--ema-primary,#807b7e)}"; }
}

exports.ema_tab_header = TabHeader;
