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 const IncentiveManagement = app => {
  return {
    name: '奖惩管理', //奖惩管理
    icon: 'jiangchengguanli',
    path: 'incentiveManagement',
    component: dynamicWrapper(app, ['profile'], () =>
      import('../routes/Personnel/IncentiveManagement/ListContainer')
    )
  };
};
