'use strict';

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

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

const tableCellCss = ".sc-bds-table-cell-h{display:table-cell;padding:0 8px;font-family:\"Nunito Sans\", \"Carbona\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif;font-size:14px;vertical-align:middle}.cell.sc-bds-table-cell{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:48px;margin:8px 0;color:var(--color-content-default, #454545);font-family:\"Nunito Sans\", \"Carbona\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.dense-cell.sc-bds-table-cell{margin:0}.cell-custom.sc-bds-table-cell{gap:8px}.cell-action.sc-bds-table-cell{-ms-flex-direction:row;flex-direction:row;gap:8px}.sc-bds-table-cell-h:first-child{padding-left:16px}.sc-bds-table-cell-h:last-child{padding-right:16px}";

const TableCell = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.isDense = false;
    this.type = 'text';
    this.sortable = false;
  }
  renderContent() {
    return this.type === 'custom' ? (index.h("div", { class: "cell cell-custom dense-cell" }, index.h("slot", null))) : this.type === 'text' ? (index.h("div", { class: "cell dense-cell" }, index.h("bds-typo", { variant: "fs-14", bold: this.sortable ? 'bold' : 'regular' }, index.h("slot", null)))) : this.type === 'action' ? (index.h("div", { class: "cell cell-action dense-cell" }, index.h("slot", null))) : this.type === 'collapse' ? (index.h("td", { colSpan: 2, class: "cell cell-action dense-cell" }, index.h("slot", null))) : (index.h("slot", null));
  }
  componentWillLoad() {
    const bdsTable = this.element.closest('bds-table');
    if (bdsTable && bdsTable.getAttribute('dense-table') === 'true') {
      this.isDense = true;
    }
  }
  render() {
    return index.h(index.Host, null, this.renderContent());
  }
  get element() { return index.getElement(this); }
};
TableCell.style = tableCellCss;

exports.bds_table_cell = TableCell;
