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