const Layout = () => import("@/layout/index.vue");

export default {
  path: "/",
  name: "Root",
  component: Layout,
  redirect: "/admin/dashboard",
  children: [
    // 信息总览
    {
      path: "/admin/dashboard",
      name: "AdminDashboard",
      component: () => import("@/views/admin/dashboard/index.vue"),
      meta: {
        icon: "ri:dashboard-line",
        title: "信息总览",
        rank: 0
      }
    },
    // 站点管理（包含子菜单）
    {
      path: "/admin/station",
      meta: {
        icon: "ri:map-pin-2-line",
        title: "站点管理",
        rank: 1
      },
      children: [
        {
          path: "/admin/station/list",
          name: "AdminStationList",
          component: () => import("@/views/admin/station/list.vue"),
          meta: {
            icon: "ri:building-2-line",
            title: "站点清单"
          }
        },
        {
          path: "/admin/station/device",
          name: "AdminStationDevice",
          component: () => import("@/views/admin/station/device.vue"),
          meta: {
            icon: "ri:settings-4-line",
            title: "设备清单"
          }
        },
        {
          path: "/admin/station/account",
          name: "AdminStationAccount",
          component: () => import("@/views/admin/station/account.vue"),
          meta: {
            icon: "ri:wallet-3-line",
            title: "站点账户"
          }
        },
        {
          path: "/admin/station/fault",
          name: "AdminStationFault",
          component: () => import("@/views/admin/station/fault/index.vue"),
          meta: {
            icon: "ri:alarm-warning-line",
            title: "故障订阅"
          }
        }
      ]
    },
    // 订单管理
    {
      path: "/admin/ordering",
      name: "AdminOrdering",
      component: () => import("@/views/admin/ordering/index.vue"),
      meta: {
        icon: "ri:file-list-3-line",
        title: "订单管理",
        rank: 2
      }
    },
    // 用户管理
    {
      path: "/admin/user",
      name: "AdminUser",
      component: () => import("@/views/admin/user/index.vue"),
      meta: {
        icon: "ri:user-line",
        title: "用户管理",
        rank: 3
      }
    },
    // 财务管理（包含子菜单）
    {
      path: "/admin/finance",
      meta: {
        icon: "ri:copper-coin-line",
        title: "财务管理",
        rank: 4
      },
      children: [
        {
          path: "/admin/finance/recharge",
          name: "AdminFinanceRecharge",
          component: () => import("@/views/admin/finance/recharge.vue"),
          meta: {
            icon: "ri:wallet-line",
            title: "充值记录"
          }
        },
        {
          path: "/admin/finance/wallet-flow",
          name: "AdminFinanceWalletFlow",
          component: () => import("@/views/admin/finance/wallet-flow.vue"),
          meta: {
            icon: "ri:exchange-funds-line",
            title: "用户资金流"
          }
        },
        {
          path: "/admin/finance/offline-recharge",
          name: "AdminOfflineRecharge",
          component: () => import("@/views/admin/finance/offline-recharge.vue"),
          meta: {
            icon: "ri:money-cny-box-line",
            title: "线下充值"
          }
        },
        {
          path: "/admin/finance/refund",
          name: "AdminFinanceRefund",
          component: () => import("@/views/admin/finance/refund.vue"),
          meta: {
            icon: "ri:refund-line",
            title: "退款清单"
          }
        },
        {
          path: "/admin/finance/withdraw",
          name: "AdminFinanceWithdraw",
          component: () => import("@/views/admin/finance/withdraw.vue"),
          meta: {
            icon: "ri:bank-card-line",
            title: "提现记录"
          }
        },
        {
          path: "/admin/finance/split-record",
          name: "AdminFinanceSplitRecord",
          component: () => import("@/views/admin/finance/split-record.vue"),
          meta: {
            icon: "ri:exchange-dollar-line",
            title: "分账记录"
          }
        },
        {
          path: "/admin/finance/settlement",
          name: "AdminFinanceSettlement",
          component: () => import("@/views/admin/finance/settlement.vue"),
          meta: {
            icon: "ri:calendar-check-line",
            title: "结算记录"
          }
        }
      ]
    },
    // 数据统计（包含子菜单）
    {
      path: "/admin/statistics",
      meta: {
        icon: "ri:bar-chart-line",
        title: "数据统计",
        rank: 5
      },
      children: [
        {
          path: "/admin/statistics/daily-stat",
          name: "AdminDailyStat",
          component: () => import("@/views/admin/statistics/daily-stat.vue"),
          meta: {
            icon: "ri:line-chart-line",
            title: "日统计"
          }
        },
        {
          path: "/admin/statistics/month-stat",
          name: "AdminMonthStat",
          component: () => import("@/views/admin/statistics/month-stat.vue"),
          meta: {
            icon: "ri:pie-chart-line",
            title: "月统计"
          }
        }
      ]
    },
    // 营销管理（包含子菜单）
    {
      path: "/admin/marketing",
      meta: {
        icon: "ri:megaphone-line",
        title: "营销管理",
        rank: 6
      },
      children: [
        {
          path: "/admin/banner",
          name: "AdminBanner",
          component: () => import("@/views/admin/banner/index.vue"),
          meta: {
            icon: "ri:image-line",
            title: "横幅广告"
          }
        },
        {
          path: "/admin/marketing/recharge-promotion",
          name: "AdminRechargePromotion",
          component: () => import("@/views/admin/platform/recharge-promotion/index.vue"),
          meta: {
            icon: "ri:gift-line",
            title: "专属优惠活动"
          }
        },
        {
          path: "/admin/marketing/parking-coupon-record",
          name: "AdminParkingCouponRecord",
          component: () => import("@/views/admin/parking-coupon-record/index.vue"),
          meta: {
            icon: "ri:coupon-line",
            title: "停车券发放记录"
          }
        }
      ]
    },
    // 平台配置（包含子菜单）
    {
      path: "/admin/platform",
      meta: {
        icon: "ri:settings-3-line",
        title: "平台配置",
        rank: 7
      },
      children: [
        {
          path: "/admin/platform/rate",
          name: "AdminPlatformRate",
          component: () => import("@/views/admin/platform/rate.vue"),
          meta: {
            icon: "ri:percent-line",
            title: "平台费率"
          }
        },
        {
          path: "/admin/platform/device-config",
          name: "AdminPlatformDeviceConfig",
          component: () => import("@/views/admin/platform/device-config.vue"),
          meta: {
            icon: "ri:server-line",
            title: "设备配置"
          }
        },
        {
          path: "/admin/platform/recharge-config",
          name: "AdminPlatformRechargeConfig",
          component: () => import("@/views/admin/platform/recharge-config.vue"),
          meta: {
            icon: "ri:money-cny-circle-line",
            title: "充值配置"
          }
        }
      ]
    },
    // 系统配置（包含子菜单）
    {
      path: "/admin/system",
      meta: {
        icon: "ri:settings-6-line",
        title: "系统配置",
        rank: 8
      },
      children: [
        {
          path: "/admin/system/role",
          name: "AdminRole",
          component: () => import("@/views/admin/role/index.vue"),
          meta: {
            icon: "ri:shield-user-line",
            title: "角色权限"
          }
        },
        {
          path: "/admin/system/dict",
          name: "AdminDict",
          component: () => import("@/views/admin/dict/index.vue"),
          meta: {
            icon: "ri:book-read-line",
            title: "数据字典"
          }
        },
        {
          path: "/admin/system/notice",
          name: "AdminNotice",
          component: () => import("@/views/admin/notice/index.vue"),
          meta: {
            icon: "ri:notification-badge-line",
            title: "系统公告"
          }
        },
        {
          path: "/admin/system/faq",
          name: "AdminFaq",
          component: () => import("@/views/admin/faq/index.vue"),
          meta: {
            icon: "ri:question-line",
            title: "常见问题"
          }
        },
        {
          path: "/admin/system/feedback",
          name: "AdminFeedback",
          component: () => import("@/views/admin/feedback/index.vue"),
          meta: {
            icon: "ri:message-3-line",
            title: "反馈上报"
          }
        },
        {
          path: "/admin/system/log",
          name: "AdminLog",
          component: () => import("@/views/admin/log/index.vue"),
          meta: {
            icon: "ri:file-list-2-line",
            title: "系统日志"
          }
        },
        {
          path: "/admin/system/department",
          name: "AdminDepartment",
          component: () => import("@/views/admin/department/index.vue"),
          meta: {
            icon: "ri:organization-chart",
            title: "部门管理"
          }
        },
        {
          path: "/admin/system/message",
          name: "AdminMessage",
          component: () => import("@/views/admin/message/index.vue"),
          meta: {
            icon: "ri:mail-line",
            title: "消息管理"
          }
        },
        {
          path: "/admin/system/template",
          name: "AdminMessageTemplate",
          component: () => import("@/views/admin/template/index.vue"),
          meta: {
            icon: "ri:file-copy-line",
            title: "消息模板"
          }
        },
        {
          path: "/admin/system/investor",
          name: "AdminInvestor",
          component: () => import("@/views/admin/investor/index.vue"),
          meta: {
            icon: "ri:user-star-line",
            title: "投资人"
          }
        },
        {
          path: "/admin/system/account",
          name: "AdminAccount",
          component: () => import("@/views/admin/account/index.vue"),
          meta: {
            icon: "ri:user-settings-line",
            title: "运维账户"
          }
        }
      ]
    }
  ]
} satisfies RouteConfigsTable;
