import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  require_react
} from "./chunk-TODKQSCF.js";
import {
  external_exports
} from "./chunk-SDLCFZRL.js";
import {
  require_lib
} from "./chunk-WGV2XQSB.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-EXLZF52D.js";

// ../cli-astro-commands/src/components/GenerateCommand/generateFlows.ts
init_esm_shims();
var import_react = __toESM(require_react(), 1);
var import_variant = __toESM(require_lib(), 1);
var DevCenterGenerateFlow = (0, import_variant.variant)({
  DashboardPage: {},
  DashboardPlugin: {},
  DashboardMenuPlugin: {},
  DashboardModal: {},
  Event: {},
  DataCollection: {},
  ServicePlugin: {},
  EmbeddedScript: {},
  SitePlugin: {},
  CustomElement: {},
  EditorReactComponent: {}
});
var getGenerateFlowByKey = (key) => {
  return (0, import_variant.match)(key, {
    DashboardPage: () => ({
      key,
      title: "Dashboard Page",
      value: DevCenterGenerateFlow.DashboardPage()
    }),
    DashboardModal: () => ({
      key,
      title: "Dashboard Modal",
      value: DevCenterGenerateFlow.DashboardModal()
    }),
    DashboardPlugin: () => ({
      key,
      title: "Dashboard Plugin",
      value: DevCenterGenerateFlow.DashboardPlugin()
    }),
    DashboardMenuPlugin: () => ({
      key,
      title: "Dashboard menu plugin",
      value: DevCenterGenerateFlow.DashboardMenuPlugin()
    }),
    EmbeddedScript: () => ({
      key,
      title: "Embedded Script",
      value: DevCenterGenerateFlow.EmbeddedScript()
    }),
    SitePlugin: () => ({
      key,
      title: "Site Plugin",
      value: DevCenterGenerateFlow.SitePlugin()
    }),
    Event: () => ({
      key,
      title: "Event",
      value: DevCenterGenerateFlow.Event()
    }),
    ServicePlugin: () => ({
      key,
      title: "Service Plugin",
      value: DevCenterGenerateFlow.ServicePlugin()
    }),
    DataCollection: () => ({
      key,
      title: "Data Collection",
      value: DevCenterGenerateFlow.DataCollection()
    }),
    CustomElement: () => ({
      key,
      title: "Custom Element",
      value: DevCenterGenerateFlow.CustomElement()
    }),
    EditorReactComponent: () => ({
      key,
      title: "Editor React Component",
      value: DevCenterGenerateFlow.EditorReactComponent()
    })
  });
};
var useGenerateFlows = ({
  experimental
}) => {
  return (0, import_react.useMemo)(() => {
    return [
      {
        title: "Dashboard",
        items: [
          getGenerateFlowByKey("DashboardPage"),
          getGenerateFlowByKey("DashboardModal"),
          getGenerateFlowByKey("DashboardPlugin"),
          getGenerateFlowByKey("DashboardMenuPlugin")
        ]
      },
      {
        title: "Site",
        items: [
          getGenerateFlowByKey("EmbeddedScript"),
          getGenerateFlowByKey("SitePlugin"),
          getGenerateFlowByKey("CustomElement"),
          ...experimental ? [getGenerateFlowByKey("EditorReactComponent")] : []
        ]
      },
      {
        title: "Backend",
        items: [
          getGenerateFlowByKey("Event"),
          getGenerateFlowByKey("ServicePlugin"),
          getGenerateFlowByKey("DataCollection")
        ]
      }
    ];
  }, [experimental]);
};

// ../cli-astro-commands/src/components/GenerateCommand/docsExtensionType.ts
init_esm_shims();
var import_variant2 = __toESM(require_lib(), 1);
var docsExtensionTypeSchema = external_exports.enum([
  "DASHBOARD_PAGE",
  "DASHBOARD_MODAL",
  "DASHBOARD_PLUGIN",
  "DASHBOARD_MENU_PLUGIN",
  "EMBEDDED_SCRIPT",
  "CUSTOM_ELEMENT",
  "EDITOR_REACT_COMPONENT",
  "SITE_PLUGIN",
  "EVENT",
  "SERVICE_PLUGIN",
  "DATA_COLLECTION"
]);
var getGenerateFlowByDocsExtensionType = (type) => {
  return (0, import_variant2.match)(type, {
    DASHBOARD_PAGE: () => getGenerateFlowByKey("DashboardPage"),
    DASHBOARD_MODAL: () => getGenerateFlowByKey("DashboardModal"),
    DASHBOARD_PLUGIN: () => getGenerateFlowByKey("DashboardPlugin"),
    DASHBOARD_MENU_PLUGIN: () => getGenerateFlowByKey("DashboardMenuPlugin"),
    EMBEDDED_SCRIPT: () => getGenerateFlowByKey("EmbeddedScript"),
    CUSTOM_ELEMENT: () => getGenerateFlowByKey("CustomElement"),
    EDITOR_REACT_COMPONENT: () => getGenerateFlowByKey("EditorReactComponent"),
    SITE_PLUGIN: () => getGenerateFlowByKey("SitePlugin"),
    EVENT: () => getGenerateFlowByKey("Event"),
    SERVICE_PLUGIN: () => getGenerateFlowByKey("ServicePlugin"),
    DATA_COLLECTION: () => getGenerateFlowByKey("DataCollection")
  });
};

export {
  useGenerateFlows,
  docsExtensionTypeSchema,
  getGenerateFlowByDocsExtensionType
};
//# sourceMappingURL=chunk-6MWJ6KVG.js.map