"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const RepeaterInner = require("./RepeaterInner.cjs");
const Repeater = reactBinding.Component(
  (props) => {
    {
      if ("sortableBy" in props && props.sortableBy !== void 0 && "orderBy" in props && props.orderBy !== void 0) {
        throw new reactBinding.BindingError(
          `Incorrect <Repeater /> use: cannot supply both the 'orderBy' and the 'sortableBy' properties.
	To allow the user to interactively order the items, use 'sortableBy'.
	To control the order in which the items are automatically displayed, use 'orderBy'.`
        );
      }
      if (!("sortableBy" in props) && !("orderBy" in props)) {
        throw new reactBinding.BindingError(
          `Using a <Repeater /> without either the 'orderBy' or the 'sortableBy' property. This will currently result in bad user experience as the items may shuffle unpredictably over time.	To allow the user to interactively order the items, use 'sortableBy'.
	To control the order in which the items are automatically displayed, use 'orderBy'.
	To disable this warning, set either of these to undefined.`
        );
      }
    }
    const entityList = reactBinding.useEntityList(props);
    return /* @__PURE__ */ jsxDevRuntime.jsxDEV(RepeaterInner.RepeaterInner, { ...props, accessor: entityList }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/Repeater/Repeater.tsx",
      lineNumber: 42,
      columnNumber: 10
    }, void 0);
  },
  (props, environment) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBinding.HasMany, { ...props, initialEntityCount: props.initialEntityCount ?? 1, children: RepeaterInner.RepeaterInner.staticRender(props, environment) }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/Repeater/Repeater.tsx",
    lineNumber: 45,
    columnNumber: 3
  }, void 0),
  "Repeater"
);
exports.Repeater = Repeater;
//# sourceMappingURL=Repeater.cjs.map
