"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const shared_esmBundler = require("../../../../../../@vue/shared/dist/shared.esm-bundler.js");
const headerRow = require("../header-row.js");
const Vue = require("vue");
const TableV2HeaderRow = /* @__PURE__ */ Vue.defineComponent({
  name: "ElTableV2HeaderRow",
  props: headerRow.tableV2HeaderRowProps,
  setup(props, { slots }) {
    return () => {
      const { columns, columnsStyles, headerIndex, style } = props;
      let Cells = columns.map((column, columnIndex) => {
        return slots.cell({
          columns,
          column,
          columnIndex,
          headerIndex,
          style: columnsStyles[column.key]
        });
      });
      if (slots.header) Cells = slots.header({
        cells: Cells.map((node) => {
          if (shared_esmBundler.isArray(node) && node.length === 1) return node[0];
          return node;
        }),
        columns,
        headerIndex
      });
      return Vue.createVNode("div", {
        "class": props.class,
        "style": style,
        "role": "row"
      }, [Cells]);
    };
  }
});
exports.default = TableV2HeaderRow;
