import { jsx as s } from "react/jsx-runtime";
import m from "../../hooks/useOptionalFormContext.js";
import p from "./components/field-array-inner/FieldArrayInner.js";
const d = ({
  name: e,
  control: t,
  children: n,
  defaultValue: i,
  min: l,
  max: a,
  disabled: c = !1
}) => {
  var o;
  const r = ((o = m()) == null ? void 0 : o.control) ?? t;
  return r ? /* @__PURE__ */ s(p, { name: e, control: r, defaultValue: i, min: l, max: a, disabled: c, children: n }) : (console.error("FieldArray requires either being inside a Form component or receiving a control prop"), null);
};
d.displayName = "FieldArray";
export {
  d as default
};
//# sourceMappingURL=FieldArray.js.map
