import { defineConfig } from '@umijs/max';
import proxy from './config/proxy';
const { REACT_APP_ENV = 'dev' } = process.env as {
  REACT_APP_ENV: 'dev' | 'test' | 'prod';
};

export default defineConfig({
  antd: {},
  access: {},
  model: {},
  initialState: {},
  request: {},
  locale: {
    default: 'vi-VN',
  },
  favicons: ['/logo.png'],
  layout: {
    title: '2025 Sản phẩm của Mobifone v1.0',
  },
  proxy: proxy[REACT_APP_ENV],
  routes: [
    {
      name: 'Login',
      path: '/login',
      component: './Auth',
      layout: false,
    },
    {
      path: '/',
      redirect: '/map',
    },
    {
      name: 'Giám sát',
      path: '/map',
      component: './Home',
      icon: 'icon-Map',
    },
    {
      name: 'Chuyến đi',
      path: '/trip',
      component: './Trip',
      icon: 'icon-specification',
    },
  ],

  npmClient: 'pnpm',
  tailwindcss: {},
});
