'use strict';

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

const index = require('./index-c18b5a7b.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) {
        index.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 (index.h(index.Host, { key: '63d7450f27eaec26afc0724f7498cd3197ccc6f3', role: "row" }, this.tableRef && this.tableRef.selectable && (index.h("pds-table-head-cell", { part: this.tableRef.fixedColumn ? 'checkbox-cell' : '' })), index.h("slot", { key: '29ccb7483aea5efc5aa6f24e9dded5bb812748e2' })));
    }
    get hostElement() { return index.getElement(this); }
};
PdsTableHead.style = PdsTableHeadStyle0;

exports.pds_table_head = PdsTableHead;

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