import { h } from "@stencil/core";
export class Tab {
    constructor() {
        this.indicatorType = 'underline';
    }
    getIndicatorClasses() {
        return {
            'mdc-tab-indicator__content': true,
            'mdc-tab-indicator__content--icon': this.indicatorType === 'icon',
            'mdc-tab-indicator__content--underline': this.indicatorType === 'underline',
            'material-icons': this.indicatorType === 'icon'
        };
    }
    getTabClasses() {
        return {
            'mdc-tab': true,
            'mdc-tab--active': this.active,
            'mdc-tab--min-width': this.minWidth
        };
    }
    async renderHtml() {
        return Promise.resolve(h("button", { class: this.getTabClasses(), role: "tab", "aria-selected": "true", tabindex: this.active ? '0' : '-1' },
            h("span", { class: "mdc-tab__content" },
                this.icon && h("span", { class: "mdc-tab__icon material-icons", "aria-hidden": "true" }, this.icon),
                h("span", { class: "mdc-tab__text-label" }, this.label ? this.label : h("slot", null))),
            h("span", { class: { 'mdc-tab-indicator': true, 'mdc-tab-indicator--active': this.active } },
                h("span", { class: this.getIndicatorClasses() }, this.indicatorType === 'icon' && 'star')),
            h("span", { class: "mdc-tab__ripple" })));
    }
    render() {
        return;
    }
    static get is() { return "materials-tab"; }
    static get encapsulation() { return "shadow"; }
    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": ""
            },
            "attribute": "active",
            "reflect": false
        },
        "icon": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "icon",
            "reflect": false
        },
        "label": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "label",
            "reflect": false
        },
        "indicatorType": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "'underline' | 'icon'",
                "resolved": "\"icon\" | \"underline\"",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "indicator-type",
            "reflect": false,
            "defaultValue": "'underline'"
        },
        "minWidth": {
            "type": "boolean",
            "mutable": false,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "min-width",
            "reflect": false
        }
    }; }
    static get methods() { return {
        "renderHtml": {
            "complexType": {
                "signature": "() => Promise<any>",
                "parameters": [],
                "references": {
                    "Promise": {
                        "location": "global"
                    }
                },
                "return": "Promise<any>"
            },
            "docs": {
                "text": "",
                "tags": []
            }
        }
    }; }
}
