export function genActiveRule(routerPrefix) {
  return location => location.pathname.startsWith(routerPrefix);
}
export default {
  dev: [
    // {
    //   name: 'civ_monitor',
    //   entry: `//${window.location.hostname}:8082/civ_monitor`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_monitor',
    // },
    {
      name: 'civ_water',
      entry: `//${window.location.hostname}:8081/civ_water`,
      container: '#micro-container',
      activeRule: '/civbase/civ_water',
    },
    {
      name: 'civ_webgis',
      entry: `//${window.location.hostname}:8082/civ_webgis`,
      container: '#micro-container',
      activeRule: '/civbase/civ_webgis',
    },
    {
      name: 'civweb4',
      entry: `//${window.location.hostname}:3020/civweb4`,
      container: '#micro-container',
      activeRule: '/civbase/civweb4',
    },
    {
      name: 'middleground',
      entry: `//${window.location.hostname}:8081/middleground`,
      container: '#micro-container',
      activeRule: '/civbase/middleground',
    },
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
  ],
};