import store from './store';

const microApps = [
  {
    name: 'wt',
    entry: '/wt/',
    activeRule: '/page-wt'
  },
  {
    name: 'page-main-data',
    entry: '/main-data/',
    activeRule: '/page-main-data'
  },
  {
    name: 'mes',
    entry: '/mes/',
    activeRule: '/page-mes'
  },
  {
    name: 'eam',
    entry: '/eam/',
    activeRule: '/page-eam'
  },
  {
    name: 'aps',
    entry: '/aps/',
    activeRule: '/page-aps'
  },

  {
    name: 'wms',
    entry: '/wms/',
    activeRule: '/page-wms'
  },

  {
    name: 'qms',
    entry: '/qms/',
    activeRule: '/page-qms'
  },

  {
    name: 'eos',
    entry: '/eos/',
    activeRule: '/page-eos'
  },

  {
    name: 'vis',
    entry: '/vis/',
    activeRule: '/page-vis'
  },
  {
    name: 'pro',
    entry: '/pro/',
    activeRule: '/page-pro'
  },
  {
    name: 'fm',
    entry: '/fm/',
    activeRule: '/page-fm'
  }
];

const apps = microApps.map((item) => {
  return {
    ...item,
    container: '#micro-container', // 子应用挂载的div
    props: {
      routerBase: item.activeRule, // 下发基础路由
      // actions
      store
    }
  };
});

export default apps;
