import { useState, createElement, Fragment } from "react";
import { Stack, TabButton } from "@contember/ui";
import { SingleKindSelectFileDialog } from "./SingleKindSelectFileDialog.js";
const DiscriminatedSelectFileDialog = ({
  components,
  selectedEntityIds,
  onToggleSelectConnector
}) => {
  const [component, setComponent] = useState(components[0]);
  return /* @__PURE__ */ createElement(Fragment, null, components.length > 1 && /* @__PURE__ */ createElement(Stack, {
    direction: "horizontal"
  }, components.map((it, index) => /* @__PURE__ */ createElement(TabButton, {
    key: index,
    onClick: () => setComponent(it),
    isSelected: it === component
  }, it.label))), /* @__PURE__ */ createElement(SingleKindSelectFileDialog, {
    onToggleSelectConnector,
    selectedEntityIds,
    ...component
  }));
};
export { DiscriminatedSelectFileDialog };
//# sourceMappingURL=DiscriminatedSelectFileDialog.js.map
