/**
 * 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 const Drag = app => {
  return {
    name: '拖动',
    icon: 'dashboard',
    path: 'drag',
    children: [
      {
        name: '任务列表',
        path: 'dragtutoriaapp',
        component: dynamicWrapper(app, [], () =>
          import('../routes/Drag/01 Dustbin/Single Target/index.js')
        )
      }
    ]
  };
};
