import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { d as defineCustomElement$3 } from './pds-icon2.js';
import { d as defineCustomElement$2 } from './pds-table-head-cell2.js';

const pdsTableHeadCss = ":host{--background-fixed:var(--pine-color-base-white);--border:var(--pine-border-default);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--background-fixed);left:0;position:-webkit-sticky;position:sticky;z-index:1}:host pds-table-checkbox-cell{-webkit-border-after:var(--border);border-block-end:var(--border)}";
const PdsTableHeadStyle0 = pdsTableHeadCss;

const PdsTableHead$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableHead extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
    }
    componentWillRender() {
        this.tableRef = this.hostElement.closest('pds-table');
        if (this.tableRef && this.tableRef.fixedColumn) {
            const tableCell = this.hostElement.querySelector('pds-table-head-cell:first-child');
            tableCell === null || tableCell === void 0 ? void 0 : tableCell.classList.add("is-fixed");
        }
    }
    render() {
        return (h(Host, { key: '63d7450f27eaec26afc0724f7498cd3197ccc6f3', role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { part: this.tableRef.fixedColumn ? 'checkbox-cell' : '' })), h("slot", { key: '29ccb7483aea5efc5aa6f24e9dded5bb812748e2' })));
    }
    get hostElement() { return this; }
    static get style() { return PdsTableHeadStyle0; }
}, [1, "pds-table-head"]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["pds-table-head", "pds-icon", "pds-table-head-cell"];
    components.forEach(tagName => { switch (tagName) {
        case "pds-table-head":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, PdsTableHead$1);
            }
            break;
        case "pds-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "pds-table-head-cell":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
    } });
}

const PdsTableHead = PdsTableHead$1;
const defineCustomElement = defineCustomElement$1;

export { PdsTableHead, defineCustomElement };

//# sourceMappingURL=pds-table-head.js.map