import { RouteConfig } from "#/route";

export const AccountManager: RouteConfig = {
  name: "AccountManager",
  path: "/account",
  meta: {
    title: "公众号管理"
  },
  component: () => import("@/views/account/account.vue")
};

export const QuickApp: RouteConfig = {
  name: "QuickApp",
  path: "/quickapp",
  meta: {
    title: "阅文快应用"
  },
  component: () => import("@/views/read/quick-app.vue")
};

export const KuaiShou: RouteConfig = {
  name: "KuaiShou",
  path: "/kuaishou",
  meta: {
    title: "快手回传"
  },
  component: () => import("@/views/account/kuaishou.vue")
};
//橙子建站
export const Orange: RouteConfig = {
  name: "Orange",
  path: "/orange",
  meta: {
    title: "橙子建站"
  },
  component: () => import("@/views/account/orange.vue")
};

export const BackManager: RouteConfig = {
  name: "BackManager",
  path: "/backmanage",
  icon: "ProjectOutlined",
  meta: {
    title: "回传管理"
  },
  component: () => import("@/views/account/index.vue"),
  children: [
    AccountManager,
    QuickApp,
    KuaiShou,
    Orange
  ]
};


const PutBook: RouteConfig = {
  name: "PutBook",
  path: "book",
  meta: {
    title: "投放书籍"
  },
  component: () => import("@/views/put/put-book.vue")
};

const PutAdAccount: RouteConfig = {
  name: "PutAdAccount",
  path: "ad-account",
  meta: {
    title: "广告账号"
  },
  component: () => import("@/views/put/put-ad-account.vue")
};

const PutData: RouteConfig = {
  name: "PutData",
  path: "data",
  meta: {
    title: "投放数据"
  },
  component: () => import("@/views/put/put-data.vue")
};

const LandingPage: RouteConfig = {
  name: "LandingPage",
  path: "landing",
  meta: {
    title: "落地页管理"
  },
  component: () => import("@/views/put/landing/index.vue")
};

const LandingAddPage: RouteConfig = {
  name: "LandingAddPage",
  path: "/put/landing/add",
  meta: {
    title: "落地页添加",
    activeMenu: "/put/landing"
  },
  hidden: true,
  component: () => import("@/views/put/landing/add.vue")
};
export const LandingEditPage: RouteConfig = {
  name: "LandingEditPage",
  path: "/put/landing/edit",
  meta: {
    title: "落地页编辑",
  },
  component: () => import("@/views/put/landing/edit.vue"),
};
const PutLog: RouteConfig = {
  name: "PutLog",
  path: "log",
  meta: {
    title: "操作日志"
  },
  component: () => import("@/views/put/put-log.vue")
};

const PutDataMore: RouteConfig = {
  name: "PutDataMore",
  path: "datamore",
  meta: {
    title: "更多投放数据",
    activeMenu: "/put/data"
  },
  hidden: true,
  component: () => import("@/views/put/put-data-more.vue")
};

const PutAdGroup: RouteConfig = {
  name: "PutAdGroup",
  path: "/put/datas/group",
  meta: {
    title: "广告组数据",
    activeMenu: "/put/datas"
  },
  component: () => import("@/views/put/ad-group.vue")
};

const PutAdAcountL: RouteConfig = {
  name: "PutAdAcountL",
  path: "/put/datas/count",
  meta: {
    title: "广告账号数据",
    activeMenu: "/put/datas"
  },
  component: () => import("@/views/put/ad-countdata.vue")
};

const PutAdPlan: RouteConfig = {
  name: "PutAdPlan",
  path: "/put/datas/ad-plan",
  meta: {
    title: "广告计划数据",
    activeMenu: "/put/datas"
  },
  component: () => import("@/views/put/put-ad-plan.vue")
};

export const PutDataTab: RouteConfig = {
  name: "PutDataTab",
  path: "/put/datas",
  meta: {
    title: "广告数据",
    noMenu: true
  },
  children: [PutAdAcountL, PutAdGroup, PutAdPlan],
  component: () => import("@/views/put/ad_datas.vue")
};

// 计划管理
export const PlanManagement: RouteConfig = {
  name: "PlanManagement",
  path: "/put/plan-management",
  meta: {
    title: "计划管理",
    noMenu: true
  },
  component: () => import("@/views/put/plan-management.vue")
};

// 建计划step1
const AccountSelect: RouteConfig = {
  name: "AccountSelect",
  path: "/put/plan-create/account-select",
  meta: {
    title: "选择投放账号",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-create/account-select.vue")
};
// 建计划step2
const GroupSelect: RouteConfig = {
  name: "GroupSelect",
  path: "/put/plan-create/group-select",
  meta: {
    title: "选择广告组",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-create/group-select.vue")
};
// 建计划step3
const EditPlan: RouteConfig = {
  name: "EditPlan",
  path: "/put/plan-create/plan-edit",
  meta: {
    title: "编辑计划",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-create/plan-edit.vue")
};
// 建计划step4
const CreativityAdd: RouteConfig = {
  name: "CreativityAdd",
  path: "/put/plan-create/creativity-add",
  meta: {
    title: "添加创意",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-create/creativity-add.vue")
};
// 建计划step5
const PlanUpload: RouteConfig = {
  name: "PlanUpload",
  path: "/put/plan-create/plan-upload",
  meta: {
    title: "上传计划",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-create/plan-upload.vue")
};

export const PlanCreate: RouteConfig = {
  name: "PlanCreate",
  path: "/put/plan-create",
  meta: {
    title: "创建计划",
    activeMenu: "/put/plan-management",
    noMenu: true
  },
  hidden: true,
  children: [AccountSelect, GroupSelect, EditPlan, CreativityAdd, PlanUpload],
  component: () => import("@/views/put/plan-create-index.vue")
};

const EditPlan1: RouteConfig = {
  name: "EditPlan1",
  path: "/put/edit-plan/plan-edit",
  meta: {
    title: "编辑计划",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-edit/planedit.vue")
};
const CreativityAdd1: RouteConfig = {
  name: "CreativityAdd1",
  path: "/put/edit-plan/add-creative",
  meta: {
    title: "编辑计划",
    activeMenu: "/put/plan-management",
  },
  component: () => import("@/views/put/plan-edit/creativeAdd.vue")
};


export const PlanEdit: RouteConfig = {
  name: "PlanEdit",
  path: "/put/edit-plan",
  meta: {
    title: "编辑计划",
    activeMenu: "/put/plan-management",
    noMenu: true
  },
  hidden: true,
  children: [EditPlan1,CreativityAdd1],
  component: () => import("@/views/put/plan-edit-index.vue")
};






export const PutManager: RouteConfig = {
  name: "PutManager",
  path: "/put",
  icon: "DesktopOutlined",
  meta: {
    title: "投放管理"
  },
  children: [
    PlanManagement,
    PutBook,
    PutAdAccount,
    PutDataTab,
    PutData,
    PutDataMore,
    LandingPage,
    LandingAddPage
  ],
  component: () => import("@/views/put/index.vue")
};

export const Financial: RouteConfig = {
  name: "Financial",
  path: "/financial",
  icon: "PayCircleOutlined",
  meta: {
    title: "财务管理"
  },
  component: () => import("@/views/financial/index.vue")
};



export const PerformanceDetial: RouteConfig = {
  name: "PerformanceDetial",
  path: "/data/performanceDetail",
  meta: {
    title: "查看详情",
    activeMenu: "/data/performance",
  },
  hidden: true,
  component: () => import("@/views/data/performance-detail.vue")
};

export const Performance: RouteConfig = {
  name: "Performance",
  path: "/data/performance",
  meta: {
    title: "员工绩效",
    noMenu: true
  },
  component: () => import("@/views/data/performance.vue")
};
export const DataAnalysis: RouteConfig = {
  name: "DataAnalysis",
  path: "/data",
  icon: "PieChartOutlined",
  meta: {
    title: "数据分析"
  },
  children: [
    Performance,
  ],
  component: () => import("@/views/data/index.vue")
};

export const VideoMaterial: RouteConfig = {
  name: "VideoMaterial",
  path: "/material/video",
  meta: {
    title: "视频库",
    noMenu: true
  },
  // children: [PutAdAcountL, PutAdGroup, PutAdPlan],
  component: () => import("@/views/material/video.vue")
};
export const PictureMaterial: RouteConfig = {
  name: "PictureMaterial",
  path: "/material/picture",
  meta: {
    title: "图片库",
    noMenu: true
  },
  // children: [PutAdAcountL, PutAdGroup, PutAdPlan],
  component: () => import("@/views/material/picture.vue")
};


export const MaterialCenter: RouteConfig = {
  name: "MaterialCenter",
  path: "/material",
  icon: "PlaySquareOutlined",
  meta: {
    title: "素材中心"
  },
  children: [
    VideoMaterial,
    PictureMaterial,
  ],
  component: () => import("@/views/material/index.vue")
};


export const ForgetPwd: RouteConfig = {
  name: "ForgetPwd",
  path: "/forgetpwd",
  hidden: true,
  meta: {
    title: "忘记密码",
  },
  component: () => import("@/views/Password.vue"),
};


const asyncRoutes: RouteConfig[] = [BackManager, DataAnalysis, PutManager,
  PlanCreate, Financial, PerformanceDetial, ForgetPwd, MaterialCenter,PlanEdit];
// const asyncRoutes: RouteConfig[] = [AccountManager, DataAnalysis, PutManager,
//   Financial, QuickApp, PerformanceDetial, ForgetPwd, MaterialCenter];

export default asyncRoutes;
