import "react";
import { INTERNAL_EXPAND_KEY, INTERNAL_SELECTION_KEY } from "./constant.js";
import { jsx } from "../../../../../../@emotion_react@11.10.4_3toe27fv7etiytxb5kxc7fxaw4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
function fixedWidth(width) {
  return typeof width === "number" || typeof width === "string" ? {
    width
  } : {};
}
function ColGroup(props) {
  var prefixCls = props.prefixCls, columns = props.columns;
  return /* @__PURE__ */ jsx("colgroup", {
    children: columns.map(function(col, index) {
      if (col.title === INTERNAL_EXPAND_KEY) {
        return /* @__PURE__ */ jsx("col", {
          className: prefixCls + "-expand-icon-col",
          style: fixedWidth(col.width)
        }, INTERNAL_EXPAND_KEY);
      }
      if (col.title === INTERNAL_SELECTION_KEY) {
        return /* @__PURE__ */ jsx("col", {
          className: prefixCls + "-selection-col",
          style: fixedWidth(col.width)
        }, INTERNAL_SELECTION_KEY);
      }
      return /* @__PURE__ */ jsx("col", {
        style: fixedWidth(col.width)
      }, col.key || index);
    })
  });
}
export {
  ColGroup as default
};
//# sourceMappingURL=colgroup.js.map
