import h from "../../@babel/runtime/helpers/esm/extends.mjs";
import i from "../../@babel/runtime/helpers/esm/objectWithoutProperties.mjs";
import * as n from "react";
import { INTERNAL_COL_DEFINE as E } from "./utils/legacyUtil.mjs";
var d = ["columnType"];
function I(r) {
  for (var s = r.colWidths, t = r.columns, v = r.columCount, e = [], p = v || t.length, l = !1, o = p - 1; o >= 0; o -= 1) {
    var u = s[o], a = t && t[o], c = a && a[E];
    if (u || c || l) {
      var m = c || {};
      m.columnType;
      var f = i(m, d);
      e.unshift(/* @__PURE__ */ n.createElement("col", h({
        key: o,
        style: {
          width: u
        }
      }, f))), l = !0;
    }
  }
  return /* @__PURE__ */ n.createElement("colgroup", null, e);
}
export {
  I as default
};
