import Drag from '@/Frameworks/SysRouter/Drag';
import { PAGE_KEY } from '@/Project/constants';

export const route: GT.IRouterOptions[] = [
  {
    key: PAGE_KEY.Home,
    component: () => import('@/Project/pages/Home/index'),
    options: {
      name: 'Home',
      right: 0,
      top: 20,
      width: 400,
      height: 500,
    },
  },
  {
    key: PAGE_KEY.Access,
    component: () => import('@/Project/pages/Access/index'),
    options: {
      name: 'Access',
      left: 100,
      top: 20,
      width: 400,
      height: 500,
    },
  },
  {
    key: PAGE_KEY.Login,
    //@ts-ignore
    component: () => import('@/Project/pages/Login'),
    //@ts-ignore
    models: () => import('@/Project/pages/Login/models/login'),
    options: {
      header: false,
    },
  },
  {
    key: PAGE_KEY.PlatformMenu,
    //@ts-ignore
    component: () => import('@/Project/pages/PlatformMenu'),
    //@ts-ignore
    models: () => import('@/Project/pages/PlatformMenu/models/menu'),
    options: {
      header: false,
    },
  },
  {
    key: PAGE_KEY.ProjectSelection,
    //@ts-ignore
    component: () => import('@/Project/pages/ProjectSelect'),
    options: {
      header: false,
    },
  },
  {
    key: PAGE_KEY.ProjectDetail,
    //@ts-ignore
    component: () => import('@/Project/pages/ProjectAdmin/ProjectDetail'),
    //@ts-ignore
    models: () => import('@/Project/pages/ProjectAdmin/models/project'),
    options: {
      header: false,
    },
  },
  {
    key: PAGE_KEY.DataMeter,
    //@ts-ignore
    component: () => import('@/Project/pages/DataMeter'),
    //@ts-ignore
    // models: () => import('@/Project/pages/Map/models/index'),
    options: {
      header: false,
    },
  },
  // {
  //   key: PAGE_KEY.Map,
  //   //@ts-ignore
  //   component: () => import('@/Project/pages/Map'),
  //   //@ts-ignore
  //   // models: () => import('@/Project/pages/Map/models/index'),
  //   options: {
  //     name: '驾驶舱',
  //     left: 0,
  //     top: 0,
  //     width: '100%',
  //     height: '100%',
  //     header: false,
  //   },
  // },
];

let Pages: { [key: string]: any } = {};
route.forEach((item) => {
  Pages[item.key] = Drag(item);
});

export default Pages;
