import * as s from "react";
import "../../../rc-field-form/es/index.mjs";
import { devUseWarning as f } from "../_util/warning.mjs";
import "../config-provider/index.mjs";
import { FormItemPrefixContext as u } from "./context.mjs";
import { ConfigContext as g } from "../config-provider/context.mjs";
import y from "../../../rc-field-form/es/List.mjs";
var O = globalThis && globalThis.__rest || function(e, n) {
  var o = {};
  for (var r in e)
    Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (o[r] = e[r]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var t = 0, r = Object.getOwnPropertySymbols(e); t < r.length; t++)
      n.indexOf(r[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[t]) && (o[r[t]] = e[r[t]]);
  return o;
};
const b = (e) => {
  var {
    prefixCls: n,
    children: o
  } = e, r = O(e, ["prefixCls", "children"]);
  if (process.env.NODE_ENV !== "production") {
    const i = f("Form.List");
    process.env.NODE_ENV !== "production" && i(typeof r.name == "number" || (Array.isArray(r.name) ? !!r.name.length : !!r.name), "usage", "Miss `name` prop.");
  }
  const {
    getPrefixCls: t
  } = s.useContext(g), a = t("form", n), c = s.useMemo(() => ({
    prefixCls: a,
    status: "error"
  }), [a]);
  return /* @__PURE__ */ s.createElement(y, Object.assign({}, r), (i, l, m) => /* @__PURE__ */ s.createElement(u.Provider, {
    value: c
  }, o(i.map((p) => Object.assign(Object.assign({}, p), {
    fieldKey: p.key
  })), l, {
    errors: m.errors,
    warnings: m.warnings
  })));
}, E = b;
export {
  E as default
};
