import { r as registerInstance, h, H as Host, g as getElement } from './index-4a3a9179.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 = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
    }
    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 getElement(this); }
};
PdsTableHead.style = PdsTableHeadStyle0;

export { PdsTableHead as pds_table_head };

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