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