"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const ui = require("@contember/ui");
const react = require("react");
const SingleKindSelectFileDialog = require("./SingleKindSelectFileDialog.cjs");
const DiscriminatedSelectFileDialog = ({
  components,
  selectedEntityIds,
  onToggleSelectConnector
}) => {
  const [component, setComponent] = react.useState(components[0]);
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
    components.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(ui.Stack, { horizontal: true, children: components.map((it, index) => /* @__PURE__ */ jsxRuntime.jsx(
      ui.TabButton,
      {
        onClick: () => setComponent(it),
        isSelected: it === component,
        children: it.label
      },
      index
    )) }),
    /* @__PURE__ */ jsxRuntime.jsx(
      SingleKindSelectFileDialog.SingleKindSelectFileDialog,
      {
        onToggleSelectConnector,
        selectedEntityIds,
        ...component
      }
    )
  ] });
};
exports.DiscriminatedSelectFileDialog = DiscriminatedSelectFileDialog;
//# sourceMappingURL=DiscriminatedSelectFileDialog.cjs.map
