import { OpenAPIHono } from '@hono/zod-openapi';
import { AuthContext } from '@d8d/shared-types';
import disabledPersonCustomRoutes from './disabled-person-custom.routes';
import { disabledPersonCrudRoutes } from './disabled-person-crud.routes';
import aggregatedRoutes from './aggregated.routes';
import personCompanyRoutes from './person-company.routes';

// 创建路由实例 - 聚合自定义路由、CRUD路由、聚合路由和残疾人企业查询路由
// 注意：具体路由（如 findPersonsWithCompany）必须在参数化路由（如 /{id}）之前定义
const disabledPersonRoutes = new OpenAPIHono<AuthContext>()
  .route('/', disabledPersonCustomRoutes)
  .route('/', personCompanyRoutes)
  .route('/', aggregatedRoutes)
  .route('/', disabledPersonCrudRoutes);

export { disabledPersonRoutes };
export default disabledPersonRoutes;