"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-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__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: [
    components.length > 1 && /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.Stack, { horizontal: true, children: components.map((it, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
      ui.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__ */ jsxDevRuntime.jsxDEV(
      SingleKindSelectFileDialog.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);
};
exports.DiscriminatedSelectFileDialog = DiscriminatedSelectFileDialog;
//# sourceMappingURL=DiscriminatedSelectFileDialog.cjs.map
