"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const reactBinding = require("@contember/react-binding");
const react = require("react");
const SingleKindSelectFileDialog = ({
  selectedEntityIds,
  onToggleSelectConnector,
  connectorFactory,
  innerComponent: Component,
  innerProps
}) => {
  const onToggleSelect = react.useCallback((entity) => {
    onToggleSelectConnector(connectorFactory(entity));
  }, [connectorFactory, onToggleSelectConnector]);
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(reactBinding.DeferredSubTrees, { fallback: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntime.jsx(
    Component,
    {
      ...innerProps,
      onToggleSelect,
      selectedEntityIds
    }
  ) }) });
};
exports.SingleKindSelectFileDialog = SingleKindSelectFileDialog;
//# sourceMappingURL=SingleKindSelectFileDialog.cjs.map
