import { Host, h } from "@stencil/core";
export class Tab {
    constructor() {
        /**
         * Is the tab active
         */
        this.active = false;
    }
    onClick() {
        this.anjTabSelect.emit();
    }
    render() {
        return (h(Host, { "aria-selected": (this.active) ? this.active.toString() : undefined, class: { 'anj-active': this.active }, role: "tab" }, this.href ? h("a", { href: this.href, class: "anj-tab" },
            h("slot", null)) : h("span", { class: "anj-tab", tabindex: "0" },
            h("slot", null))));
    }
    static get is() { return "anj-tab"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() { return {
        "$": ["tab.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["tab.css"]
    }; }
    static get properties() { return {
        "active": {
            "type": "boolean",
            "mutable": false,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Is the tab active"
            },
            "attribute": "active",
            "reflect": true,
            "defaultValue": "false"
        },
        "href": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Contains a URL or a URL fragment that the hyperlink points to."
            },
            "attribute": "href",
            "reflect": false
        }
    }; }
    static get events() { return [{
            "method": "anjTabSelect",
            "name": "anjTabSelect",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": "Fires when tab is clicked"
            },
            "complexType": {
                "original": "void",
                "resolved": "void",
                "references": {}
            }
        }]; }
    static get listeners() { return [{
            "name": "click",
            "method": "onClick",
            "target": undefined,
            "capture": false,
            "passive": false
        }]; }
}
