import { defineConfig } from '@umijs/max';
import {
  alarmsRoute,
  commonManagerRoutes,
  forgotPasswordRoute,
  loginRoute,
  managerCameraRoute,
  managerRouteBase,
  notFoundRoute,
  profileRoute,
} from './config/routes';

export default defineConfig({
  favicons: ['/gms-logo.png'],
  layout: {
    title: 'GMS',
  },
  routes: [
    loginRoute,
    forgotPasswordRoute,
    alarmsRoute,
    profileRoute,
    {
      name: 'gms.monitor',
      icon: 'icon-monitor',
      path: '/monitor',
      component: './Slave/Spole/Monitor',
    },
    {
      ...managerRouteBase,
      routes: [...commonManagerRoutes, managerCameraRoute],
    },
    {
      path: '/',
      redirect: '/monitor',
    },
    notFoundRoute,
  ],
});
