import { Host, h } from "@stencil/core";
export class PdsTab {
    constructor() {
        this.name = undefined;
        this.parentComponentId = undefined;
        this.variant = undefined;
        this.index = undefined;
        this.selected = false;
    }
    onTabClick(index, parentComponentId) {
        this.pdsTabClick.emit([index, parentComponentId]);
    }
    render() {
        const availabilityTabEdgeInlineStart = (h("span", { key: '4754a01d440847da41b9e47e32d1452fff1f4c2e', class: "pds-tab-edge", role: "presentation" }));
        const availabilityTabEdgeInlineEnd = (h("span", { key: '7ecd6e4047b9f359ccac8648251a4ea595a484f8', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
        return (h(Host, { key: 'dac9e9c4f234f32e69ecbe9ffb7638eed73c582c', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '2988c7167823c3baf37b85d3a550b2b564ef22af', role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.selected ? "0" : "-1", "aria-selected": this.selected ? "true" : "false", class: this.selected ? "pds-tab is-active" : "pds-tab", onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, h("div", { key: '1bd3abbf587a43a0f59f4e0c2971fc1756694b3a', class: "pds-tab__content" }, h("slot", { key: '86a63ec956f4cb059cb8dbdbe9d5c923145f4680' })))));
    }
    static get is() { return "pds-tab"; }
    static get originalStyleUrls() {
        return {
            "$": ["pds-tab.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pds-tab.css"]
        };
    }
    static get properties() {
        return {
            "name": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Sets the related tab name, this name must match a `pds-tabpanel`'s tab name property"
                },
                "attribute": "name",
                "reflect": false
            },
            "parentComponentId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": undefined
                        }],
                    "text": ""
                },
                "attribute": "parent-component-id",
                "reflect": false
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": undefined
                        }],
                    "text": ""
                },
                "attribute": "variant",
                "reflect": false
            },
            "index": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": undefined
                        }],
                    "text": ""
                },
                "attribute": "index",
                "reflect": false
            },
            "selected": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": undefined
                        }],
                    "text": ""
                },
                "attribute": "selected",
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
    static get events() {
        return [{
                "method": "pdsTabClick",
                "name": "pdsTabClick",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": undefined
                        }],
                    "text": ""
                },
                "complexType": {
                    "original": "object",
                    "resolved": "object",
                    "references": {}
                }
            }];
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=pds-tab.js.map
