import { useCallback, createElement, Fragment } from "react";
import { DeferredSubTrees } from "@contember/binding";
const SingleKindSelectFileDialog = ({
  selectedEntityIds,
  onToggleSelectConnector,
  connectorFactory,
  innerComponent: Component,
  innerProps
}) => {
  const onToggleSelect = useCallback((entity) => {
    onToggleSelectConnector(connectorFactory(entity));
  }, [connectorFactory, onToggleSelectConnector]);
  return /* @__PURE__ */ createElement(Fragment, null, /* @__PURE__ */ createElement(DeferredSubTrees, {
    fallback: /* @__PURE__ */ createElement(Fragment, null, "Loading...")
  }, /* @__PURE__ */ createElement(Component, {
    ...innerProps,
    onToggleSelect,
    selectedEntityIds
  })));
};
export { SingleKindSelectFileDialog };
//# sourceMappingURL=SingleKindSelectFileDialog.js.map
