"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const useResolvedSingleKindFileSelection = require("./selection/useResolvedSingleKindFileSelection.cjs");
const createEntityConnector = require("../fileHandler/utils/createEntityConnector.cjs");
const BareFileRepeater = require("./BareFileRepeater.cjs");
const react = require("react");
const useSingleKindFileHandler = require("../fileHandler/useSingleKindFileHandler.cjs");
const SingleKindFileHandler = require("../fileHandler/SingleKindFileHandler.cjs");
const SingleKindFileRepeater = reactBinding.Component(
  (props) => {
    const env = reactBinding.useEnvironment();
    const connectorFactoryFactory = react.useCallback(
      () => createEntityConnector.createEntityConnectorFactory(env, props.baseEntity),
      [env, props.baseEntity]
    );
    return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
      BareFileRepeater.BareFileRepeater,
      {
        ...props,
        fileSelection: useResolvedSingleKindFileSelection.useResolvedSingleKindFileSelection(props, connectorFactoryFactory),
        fileHandler: useSingleKindFileHandler.useSingleKindFileHandler(props, props.kindFactory)
      },
      void 0,
      false,
      {
        fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/internalComponents/SingleKindFileRepeater.tsx",
        lineNumber: 35,
        columnNumber: 4
      },
      void 0
    );
  },
  (props) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
    BareFileRepeater.BareFileRepeater,
    {
      ...props,
      fileHandler: new SingleKindFileHandler.SingleKindFileHandler(
        props.kindFactory(props),
        SingleKindFileHandler.isEmptyByUrlField(props.urlField)
      )
    },
    void 0,
    false,
    {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/internalComponents/SingleKindFileRepeater.tsx",
      lineNumber: 43,
      columnNumber: 3
    },
    void 0
  ),
  "SingleKindFileRepeater"
);
exports.SingleKindFileRepeater = SingleKindFileRepeater;
//# sourceMappingURL=SingleKindFileRepeater.cjs.map
