import { createRouter, createWebHashHistory } from 'vue-router';

import routes0 from './route-base-v5.js';
import routes1 from './route-role-v3.js';
// import routes2 from './route-dictionary-v3.js';
import routes3 from './route-dic-v3.js';
import routes5 from './route-eam-v5.js';
import routes6 from './route-wms-v5.js';
// import routes7 from './route-trace-v3.js';
import routes8 from './route-sensor-v3.js';
import routes9 from './route-finance-v3.js';
import routes10 from './custom.js';

import merge from '../merge.js';

let routes = merge.mergeArray(routes0, routes1);
// routes = merge.mergeArray(routes, routes2);
routes = merge.mergeArray(routes, routes3);
routes = merge.mergeArray(routes, routes5);
routes = merge.mergeArray(routes, routes6);
// routes = merge.mergeArray(routes, routes7);
routes = merge.mergeArray(routes, routes8);
routes = merge.mergeArray(routes, routes9);
routes = merge.mergeArray(routes, routes10);

const router = createRouter({
  history: createWebHashHistory(),
  base: '/',
  mode: 'hash',
  routes: routes,
});

export { router };
