import { requireProjectPermission } from "../../../middleware/projectAccess.js";
import agent_default from "./agent.js";
import agentFull_default from "./agentFull.js";
import apiKeys_default from "./apiKeys.js";
import artifactComponents_default from "./artifactComponents.js";
import branches_default from "./branches.js";
import contextConfigs_default from "./contextConfigs.js";
import conversations_default from "./conversations.js";
import credentialStores_default from "./credentialStores.js";
import credentials_default from "./credentials.js";
import dataComponents_default from "./dataComponents.js";
import evals_default from "./evals/index.js";
import externalAgents_default from "./externalAgents.js";
import functions_default from "./functions.js";
import functionTools_default from "./functionTools.js";
import mcpCatalog_default from "./mcpCatalog.js";
import projectMembers_default from "./projectMembers.js";
import projectPermissions_default from "./projectPermissions.js";
import projects_default from "./projects.js";
import ref_default from "./ref.js";
import subAgentArtifactComponents_default from "./subAgentArtifactComponents.js";
import subAgentDataComponents_default from "./subAgentDataComponents.js";
import subAgentExternalAgentRelations_default from "./subAgentExternalAgentRelations.js";
import subAgentFunctionTools_default from "./subAgentFunctionTools.js";
import subAgentRelations_default from "./subAgentRelations.js";
import subAgents_default from "./subAgents.js";
import subAgentTeamAgentRelations_default from "./subAgentTeamAgentRelations.js";
import subAgentToolRelations_default from "./subAgentToolRelations.js";
import thirdPartyMCPServers_default from "./thirdPartyMCPServers.js";
import tools_default from "./tools.js";
import triggers_default from "./triggers.js";
import userProjectMemberships_default from "./userProjectMemberships.js";
import { OpenAPIHono } from "@hono/zod-openapi";

//#region src/domains/manage/routes/index.ts
const app = new OpenAPIHono();
app.route("/projects", projects_default);
app.use("/projects/:projectId/*", requireProjectPermission("view"));
app.route("/projects/:projectId/branches", branches_default);
app.route("/projects/:projectId/refs", ref_default);
app.route("/projects/:projectId/members", projectMembers_default);
app.route("/projects/:projectId/permissions", projectPermissions_default);
app.route("/projects/:projectId/agents/:agentId/sub-agents", subAgents_default);
app.route("/projects/:projectId/agents/:agentId/sub-agent-relations", subAgentRelations_default);
app.route("/projects/:projectId/agents/:agentId/sub-agents/:subAgentId/external-agent-relations", subAgentExternalAgentRelations_default);
app.route("/projects/:projectId/agents/:agentId/sub-agents/:subAgentId/team-agent-relations", subAgentTeamAgentRelations_default);
app.route("/projects/:projectId/agents", agent_default);
app.route("/projects/:projectId/agents/:agentId/sub-agent-tool-relations", subAgentToolRelations_default);
app.route("/projects/:projectId/agents/:agentId/sub-agent-artifact-components", subAgentArtifactComponents_default);
app.route("/projects/:projectId/agents/:agentId/sub-agent-data-components", subAgentDataComponents_default);
app.route("/projects/:projectId/agents/:agentId/sub-agent-function-tools", subAgentFunctionTools_default);
app.route("/projects/:projectId/artifact-components", artifactComponents_default);
app.route("/projects/:projectId/agents/:agentId/context-configs", contextConfigs_default);
app.route("/projects/:projectId/conversations", conversations_default);
app.route("/projects/:projectId/credentials", credentials_default);
app.route("/projects/:projectId/credential-stores", credentialStores_default);
app.route("/projects/:projectId/data-components", dataComponents_default);
app.route("/projects/:projectId/external-agents", externalAgents_default);
app.route("/projects/:projectId/agents/:agentId/function-tools", functionTools_default);
app.route("/projects/:projectId/functions", functions_default);
app.route("/projects/:projectId/tools", tools_default);
app.route("/projects/:projectId/api-keys", apiKeys_default);
app.route("/projects/:projectId/agent", agentFull_default);
app.route("/projects/:projectId/mcp-catalog", mcpCatalog_default);
app.route("/projects/:projectId/third-party-mcp-servers", thirdPartyMCPServers_default);
app.route("/projects/:projectId/agents/:agentId/triggers", triggers_default);
app.route("/projects/:projectId/evals", evals_default);
app.route("/users/:userId/project-memberships", userProjectMemberships_default);
var routes_default = app;

//#endregion
export { routes_default as default };