'use strict';

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

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

const tableHeaderCellCss = ".sc-bds-table-th-h{display:table-cell;padding:0px 8px}.th_cell.sc-bds-table-th{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:64px;gap:8px;font-family:\"Nunito Sans\", \"Carbona\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}.th_cell--sortable-true.sc-bds-table-th:hover,.th_cell--sortable-false.sc-bds-table-th:hover{cursor:pointer}.dense-th.sc-bds-table-th{min-height:48px;height:auto}.sc-bds-table-th-h:first-child{padding-left:16px}.sc-bds-table-th-h:last-child{padding-right:16px}";

const TableHeaderCell = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.isDense = false;
        this.sortable = false;
        this.arrow = '';
    }
    componentWillLoad() {
        const bdsTable = this.element.closest('bds-table');
        if (bdsTable && (bdsTable.getAttribute('dense-table') === 'true' || bdsTable.denseTable === true)) {
            this.isDense = true;
        }
    }
    render() {
        return (index.h(index.Host, { key: 'b35399308032fda895f61fc26340305dcbd388e6' }, index.h("div", { key: '95be984765e49f2f441c4c82081d9f0544b86789', class: {
                th_cell: true,
                [`th_cell--sortable-${this.sortable}`]: true,
                'dense-th': this.isDense,
            } }, index.h("bds-typo", { key: '5378e67718727bf181a5b241bec42d9c1a751e16', bold: this.sortable ? 'bold' : 'semi-bold', variant: "fs-14" }, index.h("slot", { key: 'f5feeddc812d582612b0e3d5eb5fed60e5c21bfe' })), this.sortable ? (index.h("bds-icon", { size: "small", name: this.arrow === 'asc' ? 'arrow-down' : this.arrow === 'dsc' ? 'arrow-up' : '' })) : (index.h("div", { style: { width: '20px' } })))));
    }
    get element() { return index.getElement(this); }
};
TableHeaderCell.style = tableHeaderCellCss;

exports.bds_table_th = TableHeaderCell;

//# sourceMappingURL=bds-table-th.cjs.entry.js.map