import { jsxDEV, Fragment } from "react/jsx-dev-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__ */ jsxDEV(Fragment, { children: [
    components.length > 1 && /* @__PURE__ */ jsxDEV(Stack, { horizontal: true, children: components.map((it, index) => /* @__PURE__ */ jsxDEV(
      TabButton,
      {
        onClick: () => setComponent(it),
        isSelected: it === component,
        children: it.label
      },
      index,
      false,
      {
        fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/internalComponents/selection/DiscriminatedSelectFileDialog.tsx",
        lineNumber: 27,
        columnNumber: 5
      },
      void 0
    )) }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/internalComponents/selection/DiscriminatedSelectFileDialog.tsx",
      lineNumber: 25,
      columnNumber: 29
    }, void 0),
    /* @__PURE__ */ jsxDEV(
      SingleKindSelectFileDialog,
      {
        onToggleSelectConnector,
        selectedEntityIds,
        ...component
      },
      void 0,
      false,
      {
        fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/internalComponents/selection/DiscriminatedSelectFileDialog.tsx",
        lineNumber: 36,
        columnNumber: 3
      },
      void 0
    )
  ] }, void 0, true, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/internalComponents/selection/DiscriminatedSelectFileDialog.tsx",
    lineNumber: 24,
    columnNumber: 9
  }, void 0);
};
export {
  DiscriminatedSelectFileDialog
};
//# sourceMappingURL=DiscriminatedSelectFileDialog.js.map
