/**
 * Created by Administrator on 2017/12/18 0018.人事招聘
 */
import dynamic from 'dva/dynamic';

// wrapper of dynamic
const dynamicWrapper = (app, models, component) =>
  dynamic({
    app,
    models: () => models.map(m => import(`../models/${m}.js`)),
    component
  });

export default app => {
  return {
    name: '临保任务',
    icon: 'renshizhaopin',
    path: 'temporary/insurance',
    children: [
      {
        name: '临保任务列表',
        path: 'list',
        component: dynamicWrapper(app, [], () =>
          import('../routes/temporaryInsurance/TemporaryInsurance')
        )
      }
    ]
  };
};
