import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';

const bsChartTableCss = ":host{border:0;clip:rect(0 0 0 0);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";

const BsChartTable = /*@__PURE__*/ proxyCustomElement(class BsChartTable extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    this.data = undefined;
    this.dataIdxLabels = undefined;
    this.tableTitle = '';
  }
  render() {
    var _a, _b, _c;
    return (h(Host, null, h("table", { summary: this.tableTitle }, h("thead", null, h("tr", null, h("th", { colSpan: ((_a = this.dataIdxLabels) === null || _a === void 0 ? void 0 : _a.length) + 1 }, this.tableTitle)), h("tr", null, h("th", { scope: "col" }, "Dataset"), (_b = this.dataIdxLabels) === null || _b === void 0 ? void 0 :
      _b.map(idxLabel => (h("th", { scope: "col" }, idxLabel))))), h("tbody", null, (_c = this.data) === null || _c === void 0 ? void 0 : _c.map(dataset => (h("tr", null, h("th", { scope: "row" }, dataset.label), dataset.data.map(d => (h("td", null, d))))))))));
  }
  static get style() { return bsChartTableCss; }
}, [1, "bs-chart-table", {
    "data": [16],
    "dataIdxLabels": [16],
    "tableTitle": [1, "table-title"]
  }]);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["bs-chart-table"];
  components.forEach(tagName => { switch (tagName) {
    case "bs-chart-table":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, BsChartTable);
      }
      break;
  } });
}

export { BsChartTable as B, defineCustomElement as d };

//# sourceMappingURL=bs-chart-table2.js.map