import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';

const pdsTabCss = "pds-tab{--border-none:var(--pine-border-width-none);--border-radius-availability:var(--pine-border-radius-100);--border-radius-default:var(--pine-border-radius-125);--border-radius-none:var(--pine-border-radius-0);--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-purple-300);--color-background-active:var(--pine-color-grey-900);--color-background-availability:var(--pine-color-white);--color-background-default:var(--pine-color-grey-300);--color-background-hover:var(--pine-color-grey-100);--color-indicator-active:var(--pine-color-mercury-500);--color-text-active:var(--pine-color-grey-900);--color-text-active-inverse:var(--pine-color-white);--color-text-default:var(--pine-color-grey-700);--color-text-focus:var(--pine-color-grey-800);--letter-spacing-default:var(--pine-letter-spacing-body-md);--outline:4px solid var(--pine-color-blue-200);--spacing-padding-none:var(--pine-spacing-0);--typography-default:var(--pine-typography-body-md-medium);display:inline-block;position:relative}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--border-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--spacing-padding-none);-ms-flex-align:center;align-items:center;color:var(--color-text-default);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--color-text-active)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover{color:var(--color-text-active)}.pds-tab:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-tab .pds-tab__content{font:var(--typography-default);letter-spacing:var(--letter-spacing-default);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--color-indicator-active);bottom:0;content:\"\";height:3px;left:0;opacity:0;position:absolute;right:0}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:var(--border-radius-availability) var(--border-radius-availability) var(--border-radius-none) var(--border-radius-none);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--color-background-availability)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:1}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true]){--color-background-tab:var(--color-background-default)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--color-text-default)}.pds-tabs--availability .pds-tab__content{padding-bottom:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:\"\";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter{--color-background-tab:var(--color-background-active)}.pds-tabs--filter .pds-tab{background-color:var(--color-background-tab);border-radius:50px;color:var(--color-text-active);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{--color-background-tab:var(--color-background-active);color:var(--color-text-active-inverse)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true]){--color-background-tab:var(--color-background-hover)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:0;padding-block-end:0}.pds-tabs--filter .pds-tab__content::after{content:unset}";
const PdsTabStyle0 = pdsTabCss;

const PdsTab$1 = /*@__PURE__*/ proxyCustomElement(class PdsTab extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.pdsTabClick = createEvent(this, "pdsTabClick", 7);
        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: 'd98a922aaa1b9a6023830badc391c3d1d615ec6a', class: "pds-tab-edge", role: "presentation" }));
        const availabilityTabEdgeInlineEnd = (h("span", { key: '390da28bb3fd9ab1fa2fddda45569e92d4547fa3', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
        return (h(Host, { key: '5996673486d4bd95f98a691b155529a60655e92f', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '6eded79f9d5aa9093080933aa9aaa2ad88440759', 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: '9f8927d976b6964c22414e9fbb8680b9132370fa', class: "pds-tab__content" }, h("slot", { key: '691c6cf5e42bc42c6492276fd5905733c424921c' })))));
    }
    get el() { return this; }
    static get style() { return PdsTabStyle0; }
}, [4, "pds-tab", {
        "name": [1],
        "parentComponentId": [1, "parent-component-id"],
        "variant": [1],
        "index": [2],
        "selected": [4]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["pds-tab"];
    components.forEach(tagName => { switch (tagName) {
        case "pds-tab":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, PdsTab$1);
            }
            break;
    } });
}

const PdsTab = PdsTab$1;
const defineCustomElement = defineCustomElement$1;

export { PdsTab, defineCustomElement };

//# sourceMappingURL=pds-tab.js.map