/**
 * 分销管理路由配置
 *
 * 【模块说明】
 * - /distribution/dashboard  : 分销概览
 * - /distribution/distributor : 分销员管理
 * - /distribution/referral   : 推荐记录
 * - /distribution/commission : 佣金记录
 * - /distribution/withdrawal : 提现管理
 * - /distribution/report     : 月度报表
 * - /distribution/config     : 分销配置
 *
 * 【小程序端 API】
 * - /mp/distribution/*       : 小程序端专属接口
 */

export default {
  path: "/distribution",
  redirect: "/distribution/dashboard",
  meta: {
    icon: "ep:share",
    title: "分销管理",
    rank: 7,
    roles: ["admin"]
  },
  children: [
    {
      path: "/distribution/dashboard",
      name: "DistributionDashboard",
      component: () => import("@/views/distribution/dashboard/index.vue"),
      meta: {
        icon: "ep:data-analysis",
        title: "分销概览"
      }
    },
    {
      path: "/distribution/distributor",
      name: "DistributionDistributor",
      component: () => import("@/views/distribution/distributor/index.vue"),
      meta: {
        icon: "ep:user",
        title: "分销员管理"
      }
    },
    {
      path: "/distribution/distributor/detail",
      name: "DistributionDistributorDetail",
      component: () => import("@/views/distribution/distributor/detail.vue"),
      meta: {
        title: "分销员详情",
        showLink: false
      }
    },
    {
      path: "/distribution/referral",
      name: "DistributionReferral",
      component: () => import("@/views/distribution/referral/index.vue"),
      meta: {
        icon: "ep:connection",
        title: "推荐记录"
      }
    },
    {
      path: "/distribution/commission",
      name: "DistributionCommission",
      component: () => import("@/views/distribution/commission/index.vue"),
      meta: {
        icon: "ep:money",
        title: "佣金记录"
      }
    },
    {
      path: "/distribution/withdrawal",
      name: "DistributionWithdrawal",
      component: () => import("@/views/distribution/withdrawal/index.vue"),
      meta: {
        icon: "ep:wallet",
        title: "提现管理"
      }
    },
    {
      path: "/distribution/report",
      name: "DistributionReport",
      component: () => import("@/views/distribution/report/index.vue"),
      meta: {
        icon: "ep:document",
        title: "月度报表"
      }
    },
    {
      path: "/distribution/config",
      name: "DistributionConfig",
      component: () => import("@/views/distribution/config/index.vue"),
      meta: {
        icon: "ep:setting",
        title: "分销配置"
      }
    }
  ]
} satisfies RouteConfigsTable;
