import { OpenAPIHono } from '@hono/zod-openapi';
import printerListRoute from './printers/list.mt';
import printerCreateRoute from './printers/create.mt';
import printerDetailRoute from './printers/detail.mt';
import printerUpdateRoute from './printers/update.mt';
import printerDeleteRoute from './printers/delete.mt';
import printerStatusRoute from './printers/status.mt';
import printerSetDefaultRoute from './printers/set-default.mt';
import printTaskCreateRoute from './tasks/create.mt';
import printTaskListRoute from './tasks/list.mt';
import printTaskDetailRoute from './tasks/detail.mt';
import printTaskStatusRoute from './tasks/status.mt';
import printTaskCancelRoute from './tasks/cancel.mt';
import printTaskRetryRoute from './tasks/retry.mt';
import schedulerStatusRoute from './scheduler/status.mt';
import schedulerStartRoute from './scheduler/start.mt';
import schedulerStopRoute from './scheduler/stop.mt';
import schedulerHealthRoute from './scheduler/health.mt';
import schedulerTriggerRoute from './scheduler/trigger.mt';
import printConfigListRoute from './config/list.mt';
import printConfigUpdateRoute from './config/update.mt';

// 飞鹅打印模块主路由 - 多租户版本
export const FeieMtRoutes = new OpenAPIHono()
  .route('/printers', printerListRoute)
  .route('/printers', printerCreateRoute)
  .route('/printers', printerDetailRoute)
  .route('/printers', printerUpdateRoute)
  .route('/printers', printerDeleteRoute)
  .route('/printers', printerStatusRoute)
  .route('/printers', printerSetDefaultRoute)
  .route('/tasks', printTaskCreateRoute)
  .route('/tasks', printTaskListRoute)
  .route('/tasks', printTaskDetailRoute)
  .route('/tasks', printTaskStatusRoute)
  .route('/tasks', printTaskCancelRoute)
  .route('/tasks', printTaskRetryRoute)
  .route('/scheduler', schedulerStatusRoute)
  .route('/scheduler', schedulerStartRoute)
  .route('/scheduler', schedulerStopRoute)
  .route('/scheduler', schedulerHealthRoute)
  .route('/scheduler', schedulerTriggerRoute)
  .route('/config', printConfigListRoute)
  .route('/config', printConfigUpdateRoute);

// 导出路由配置，用于集成到主应用
export const feieMtRoutesExport = {
  '/api/v1/feie': FeieMtRoutes
};

export default FeieMtRoutes;