"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const reactBindingUi = require("@contember/react-binding-ui");
const ui = require("@contember/ui");
const react = require("react");
const RepeaterItem = react.memo(react.forwardRef(({
  canBeRemoved,
  children,
  createNewEntity: _INTENTIONALLY_OMITTED_createNewEntity,
  dragHandleComponent,
  index,
  label,
  removalType,
  ...rest
}, forwardedRef) => {
  if (removalType !== "delete") {
    throw new reactBinding.BindingError(
      `As a temporary limitation, <Repeater /> can currently only delete its items, not disconnect them. This restriction is planned to be lifted sometime in future.`
    );
  }
  return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
    ui.RepeaterItemContainer,
    {
      ref: forwardedRef,
      dragHandleComponent,
      label,
      index,
      actions: canBeRemoved && /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBindingUi.DeleteEntityButton, {}, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterItem.tsx",
        lineNumber: 42,
        columnNumber: 29
      }, void 0),
      ...rest,
      children
    },
    void 0,
    false,
    {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterItem.tsx",
      lineNumber: 37,
      columnNumber: 3
    },
    void 0
  );
}));
RepeaterItem.displayName = "RepeaterItem";
exports.RepeaterItem = RepeaterItem;
//# sourceMappingURL=RepeaterItem.cjs.map
