export type AdminPermissionPackage = {
  key: string;
  label: string;
  slugs: string[];
};

export const ADMIN_PERMISSION_PACKAGES: Record<string, AdminPermissionPackage[]> = {
  dashboard: [
    { key: "view", label: "查看", slugs: ["prd.dashboard.view"] },
  ],
  admin_users: [
    { key: "manage", label: "管理", slugs: ["prd.admin_user.manage"] },
  ],
  admin_roles: [
    { key: "manage", label: "管理", slugs: ["prd.admin_role.manage"] },
  ],
  agents: [
    { key: "node_view", label: "节点·查看", slugs: ["prd.agent.view"] },
    { key: "node_manage", label: "节点·管理", slugs: ["prd.agent.manage"] },
    { key: "role_view", label: "角色·查看", slugs: ["prd.agent.role.view"] },
    { key: "role_manage", label: "角色·管理", slugs: ["prd.agent.role.manage"] },
    { key: "user_view", label: "账号·查看", slugs: ["prd.agent.user.view"] },
    { key: "user_manage", label: "账号·管理", slugs: ["prd.agent.user.manage"] },
  ],
  players: [
    {
      key: "view",
      label: "查看",
      slugs: ["prd.users.view_finance", "prd.users.view_cs"],
    },
    { key: "manage", label: "管理", slugs: ["prd.users.manage"] },
    { key: "control", label: "控制", slugs: ["prd.player_freeze.manage"] },
  ],
  currencies: [
    { key: "manage", label: "管理", slugs: ["prd.currency.manage"] },
  ],
  wallet: [
    {
      key: "view",
      label: "查看",
      slugs: ["prd.wallet_reconcile.view", "prd.wallet_reconcile.view_cs", "prd.users.view_finance"],
    },
    {
      key: "manage",
      label: "管理",
      slugs: ["prd.wallet_reconcile.manage", "prd.wallet_adjust.manage"],
    },
  ],
  draws: [
    { key: "view", label: "查看", slugs: ["prd.draw_result.view"] },
    { key: "manage", label: "管理", slugs: ["prd.draw_result.manage"] },
    { key: "reopen", label: "重开", slugs: ["prd.draw_reopen.manage"] },
  ],
  rules_plays: [
    { key: "manage", label: "管理", slugs: ["prd.play_switch.manage"] },
    { key: "view", label: "查看", slugs: ["prd.odds.view"] },
    { key: "config", label: "配置", slugs: ["prd.odds.manage"] },
  ],
  rules_odds: [
    { key: "view", label: "查看", slugs: ["prd.rebate.view"] },
    { key: "manage", label: "管理", slugs: ["prd.odds.manage", "prd.rebate.manage"] },
  ],
  risk_cap: [
    { key: "view", label: "查看", slugs: ["prd.risk_cap.view"] },
    { key: "manage", label: "管理", slugs: ["prd.risk_cap.manage"] },
  ],
  risk: [
    { key: "view", label: "查看", slugs: ["prd.risk.view"] },
    { key: "manage", label: "管理", slugs: ["prd.risk.manage"] },
  ],
  settlement: [
    { key: "view", label: "查看", slugs: ["prd.payout.view"] },
    { key: "review", label: "审核", slugs: ["prd.payout.review"] },
    { key: "manage", label: "管理", slugs: ["prd.payout.manage"] },
  ],
  reconcile: [
    {
      key: "view",
      label: "查看",
      slugs: ["prd.wallet_reconcile.view", "prd.wallet_reconcile.view_cs"],
    },
    { key: "manage", label: "管理", slugs: ["prd.wallet_reconcile.manage"] },
  ],
  reports: [
    { key: "view", label: "查看", slugs: ["prd.report.view"] },
    { key: "export", label: "导出", slugs: ["prd.report.export"] },
  ],
  tickets: [
    { key: "view", label: "查看", slugs: ["prd.tickets.view"] },
  ],
  audit: [
    { key: "view", label: "查看", slugs: ["prd.audit.view"] },
  ],
  settings: [
    { key: "manage", label: "管理", slugs: ["prd.wallet_reconcile.manage", "prd.currency.manage"] },
  ],
  integration: [
    { key: "view", label: "查看", slugs: ["prd.integration.view"] },
    { key: "manage", label: "管理", slugs: ["prd.integration.manage"] },
  ],
  settlement_agent: [
    { key: "view", label: "查看", slugs: ["prd.settlement.agent.view"] },
    { key: "manage", label: "管理", slugs: ["prd.settlement.agent.manage"] },
  ],
  jackpot: [
    { key: "view", label: "查看", slugs: ["prd.jackpot.view"] },
    { key: "manage", label: "管理", slugs: ["prd.jackpot.manage"] },
    { key: "special", label: "特权", slugs: ["prd.jackpot.manual_burst"] },
  ],
};

