"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const BareUploadField = require("./BareUploadField.cjs");
const useResolvedSingleKindFileSelection = require("./selection/useResolvedSingleKindFileSelection.cjs");
const createEntityConnector = require("../fileHandler/utils/createEntityConnector.cjs");
const react = require("react");
const useSingleKindFileHandler = require("../fileHandler/useSingleKindFileHandler.cjs");
const SingleKindFileHandler = require("../fileHandler/SingleKindFileHandler.cjs");
const SingleKindUploadField = reactBinding.Component(
  (props) => {
    const env = reactBinding.useEnvironment();
    const connectorFactoryFactory = react.useCallback(
      () => createEntityConnector.createEntityConnectorFactory(env, props.baseEntity),
      [env, props.baseEntity]
    );
    return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
      BareUploadField.BareUploadField,
      {
        ...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/SingleKindUploadField.tsx",
        lineNumber: 29,
        columnNumber: 4
      },
      void 0
    );
  },
  (props) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
    BareUploadField.BareUploadField,
    {
      ...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/SingleKindUploadField.tsx",
      lineNumber: 37,
      columnNumber: 3
    },
    void 0
  ),
  "SingleKindUploadField"
);
exports.SingleKindUploadField = SingleKindUploadField;
//# sourceMappingURL=SingleKindUploadField.cjs.map
