'use strict';

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

const core = require('./core-859ae5a6.js');

const Tab = class {
    constructor(hostRef) {
        core.registerInstance(this, hostRef);
        /**
         * Is the tab active
         */
        this.active = false;
        this.anjTabSelect = core.createEvent(this, "anjTabSelect", 7);
    }
    onClick() {
        this.anjTabSelect.emit();
    }
    render() {
        return (core.h(core.Host, { "aria-selected": (this.active) ? this.active.toString() : undefined, class: { 'anj-active': this.active }, role: "tab" }, this.href ? core.h("a", { href: this.href, class: "anj-tab" }, core.h("slot", null)) : core.h("span", { class: "anj-tab", tabindex: "0" }, core.h("slot", null))));
    }
    static get style() { return ".sc-anj-tab-h {\n  border-bottom: 2px solid transparent;\n  cursor: pointer;\n  letter-spacing: var(--anj-spacing-wider);\n  margin: 0 0.75rem;\n  -webkit-transition: border-color 0.3s ease;\n  transition: border-color 0.3s ease;\n}\n.sc-anj-tab-h:first-child {\n  margin-left: 0;\n}\n.sc-anj-tab-h:last-child {\n  margin-right: 0;\n}\n.sc-anj-tab-h:hover, .sc-anj-tab-h:focus, .sc-anj-tab-h:focus-within {\n  border-color: var(--anj-highlight);\n  outline: none;\n}\n.anj-active.sc-anj-tab-h, .anj-active.sc-anj-tab-h:hover, .anj-active.sc-anj-tab-h:active {\n  border-color: var(--anj-primary);\n  font-weight: 600;\n}\n.anj-active.sc-anj-tab-h .anj-tab.sc-anj-tab, .anj-active.sc-anj-tab-h:hover .anj-tab.sc-anj-tab, .anj-active.sc-anj-tab-h:active .anj-tab.sc-anj-tab {\n  color: var(--anj-primary);\n}\n.sc-anj-tab-h .sc-anj-tab-s > .anj-tab, .sc-anj-tab-h .anj-tab.sc-anj-tab {\n  color: var(--anj-highlight);\n  display: block;\n  padding: 0.5rem 1rem;\n}\n.sc-anj-tab-h .sc-anj-tab-s > .anj-tab:hover, .sc-anj-tab-h .anj-tab.sc-anj-tab:hover {\n  color: var(--anj-highlight);\n  text-decoration: none;\n}\n.sc-anj-tab-h .sc-anj-tab-s > .anj-tab:focus, .sc-anj-tab-h .anj-tab.sc-anj-tab:focus {\n  outline: none;\n  text-decoration: none;\n}"; }
};

exports.anj_tab = Tab;
