import { OpenAPIHono } from '@hono/zod-openapi';
import listChaptersRoute from './get';
import createChapterRoute from './post';
import aiSuggestionsRoute from './[chapterId]/ai-suggestions/post';
import applyAIRoute from './[chapterId]/apply-ai/post';
import { AuthContext } from '@/server/types/context';

// 创建路由实例并聚合所有子路由
const app = new OpenAPIHono<AuthContext>()
  .route('/', listChaptersRoute)
  .route('/', createChapterRoute)
  .route('/', aiSuggestionsRoute)
  .route('/', applyAIRoute);

export default app;