import { defineConfig } from 'umi';

export default defineConfig({
  routes: [
    // 前台路由（无需登录）
    {
      path: '/',
      component: '@/pages/Homepage',
      layout: false,
    },
    {
      path: '/pricing',
      component: '@/pages/Pricing',
      layout: false,
    },
    {
      path: '/case-study',
      component: '@/pages/CaseStudy',
      layout: false,
    },
    {
      path: '/case-study/:id',
      component: '@/pages/CaseStudy',
      layout: false,
    },
    {
      path: '/auth',
      layout: false,
      routes: [
        {
          path: 'login',
          component: '@/pages/Auth/LoginPage',
        },
        {
          path: 'register',
          component: '@/pages/Auth/RegisterPage',
        },
      ],
    },
    // 后台路由（需要登录）
    {
      path: '/dashboard',
      layout: '@/layouts/index',
      routes: [
        {
          path: '',
          component: '@/pages/OperationAgent',
        },
        {
          path: 'operation-agent',
          component: '@/pages/OperationAgent',
        },
        // 其他后台页面
      ],
    },
  ],
  fastRefresh: true,
});