import { OpenAPIHono } from '@hono/zod-openapi';
import { AuthContext } from '@d8d/shared-types';
import loginRoute from './login.route.mt';
import registerRoute from './register.route.mt';
import miniLoginRoute from './mini-login.route.mt';
import meRoute from './me.route.mt';
import updateMeRoute from './update-me.route.mt';
import logoutRoute from './logout.route.mt';
import ssoVerifyRoute from './sso-verify.route.mt';
import phoneDecryptRoute from './phone-decrypt.route.mt';
import sendTemplateMessageRoute from './send-template-message.route.mt';
import sendWechatShopDeliveryRoute from './send-wechat-shop-delivery.route.mt';
import getDeliveryCompaniesRoute from './get-delivery-companies.route.mt';
import getIsTradeManagedRoute from './get-is-trade-managed.route.mt';
import uploadShippingInfoRoute from './upload-shipping-info.route.mt';

// 创建统一的路由应用
const authRoutes = new OpenAPIHono<AuthContext>()
  .route('/', loginRoute)
  .route('/', registerRoute)
  .route('/', miniLoginRoute)
  .route('/', meRoute)
  .route('/', updateMeRoute)
  .route('/', logoutRoute)
  .route('/', ssoVerifyRoute)
  .route('/', phoneDecryptRoute)
  .route('/', sendTemplateMessageRoute)
  .route('/', sendWechatShopDeliveryRoute)
  .route('/', getDeliveryCompaniesRoute)
  .route('/', getIsTradeManagedRoute)
  .route('/', uploadShippingInfoRoute);

export { authRoutes };
export default authRoutes;