'use strict';

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

const index = require('./index-c18b5a7b.js');

const pdsTabCss = "pds-tab{--background-color-tab:var(--pine-color-neutral-grey-300);--background-color-tab-active:var(--pine-color-neutral-charcoal-400);--background-color-tab-hover:var(--pine-color-neutral-grey-400);--border-radius:var(--pine-border-radius-xs);--color:var(--pine-color-neutral-charcoal-200);--color-active:var(--pine-color-neutral-charcoal-400);--color-focus:var(--pine-color-neutral-charcoal-300);--color-white:var(--pine-color-base-white);--font-size-body:var(--pine-font-size-body);--font-size-sm:var(--pine-font-size-body-sm);--font-size-xs:var(--pine-font-size-body-xs);--font-weight:var(--pine-font-weight-medium);--line-height-md:var(--pine-line-height-md);--line-height-sm:var(--pine-line-height-sm);--line-height-xs:var(--pine-line-height-xs);--outline:4px solid var(--pine-color-primary-200);display:inline-block;position:relative}*:focus-visible{border-radius:var(--border-radius);outline:var(--outline)}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:0;-ms-flex-align:center;align-items:center;color:var(--color);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-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-active)}.pds-tab:focus-visible{color:var(--color-focus)}.pds-tab .pds-tab__content{font-family:inherit;font-size:var(--font-size-body);font-weight:var(--font-weight);line-height:var(--line-height-md);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:currentColor;bottom:0;content:\"\";height:3px;left:0;opacity:0;position:absolute;right:0}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--tab-background-color:transparent}.pds-tabs--availability .pds-tab{background-color:var(--tab-background-color);border-radius:8px 8px 0 0;padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--tab-background-color:var(--color-white)}.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]){--tab-background-color:var(--background-color-tab)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--color)}.pds-tabs--availability .pds-tab__content{font-size:var(--font-size-xs);line-height:var(--line-height-xs);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(--tab-background-color);box-shadow:4px 4px 0 0 var(--tab-background-color);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(--tab-background-color);box-shadow:-4px 4px 0 0 var(--tab-background-color);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter{--tab-background-color:var(--background-color-tab)}.pds-tabs--filter .pds-tab{background-color:var(--tab-background-color);border-radius:50px;color:var(--color-active);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{--tab-background-color:var(--background-color-tab-active);color:var(--color-white)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true]){--tab-background-color:var(--background-color-tab-hover)}.pds-tabs--filter .pds-tab__content{font-size:var(--font-size-sm);line-height:var(--line-height-sm);-webkit-padding-after:0;padding-block-end:0}.pds-tabs--filter .pds-tab__content::after{content:unset}";
const PdsTabStyle0 = pdsTabCss;

const PdsTab = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.pdsTabClick = index.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 = (index.h("span", { key: '4754a01d440847da41b9e47e32d1452fff1f4c2e', class: "pds-tab-edge", role: "presentation" }));
        const availabilityTabEdgeInlineEnd = (index.h("span", { key: '7ecd6e4047b9f359ccac8648251a4ea595a484f8', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
        return (index.h(index.Host, { key: 'dac9e9c4f234f32e69ecbe9ffb7638eed73c582c', variant: this.variant, slot: "tabs", index: this.index }, 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, index.h("div", { key: '1bd3abbf587a43a0f59f4e0c2971fc1756694b3a', class: "pds-tab__content" }, index.h("slot", { key: '86a63ec956f4cb059cb8dbdbe9d5c923145f4680' })))));
    }
    get el() { return index.getElement(this); }
};
PdsTab.style = PdsTabStyle0;

exports.pds_tab = PdsTab;

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