export enum RightType {
  // === 系统费用类 ===
  COST_FEE = 'COST_FEE',                          // 成本费 2800U
  OPERATION_FEE = 'OPERATION_FEE',                // 运营费 2100U
  HEADQUARTERS_BASE_FEE = 'HEADQUARTERS_BASE_FEE', // 总部社区基础费 203U
  RWAD_POOL_INJECTION = 'RWAD_POOL_INJECTION',    // RWAD底池注入 5760U

  // === 用户权益类 ===
  SHARE_RIGHT = 'SHARE_RIGHT',                    // 分享权益 3600U
  PROVINCE_AREA_RIGHT = 'PROVINCE_AREA_RIGHT',    // 省区域权益 108U + 1%算力
  PROVINCE_TEAM_RIGHT = 'PROVINCE_TEAM_RIGHT',    // 省团队权益 144U
  CITY_AREA_RIGHT = 'CITY_AREA_RIGHT',            // 市区域权益 252U + 2%算力
  CITY_TEAM_RIGHT = 'CITY_TEAM_RIGHT',            // 市团队权益 288U
  COMMUNITY_RIGHT = 'COMMUNITY_RIGHT',            // 社区权益 576U

  // [2026-02-26] 新增：总部运营成本压力涨价，加价部分全额归总部 (S0000000001)
  // 金额动态（由 admin-service TreePricingConfig 配置），不计入基础 15831
  HQ_PRICE_SUPPLEMENT = 'HQ_PRICE_SUPPLEMENT',
}

// 基础 10 类分配类型（不含动态加价 HQ_PRICE_SUPPLEMENT）
type BaseRightType = Exclude<RightType, RightType.HQ_PRICE_SUPPLEMENT>;

// 权益金额配置（基础 10 类，不含动态加价）
export const RIGHT_AMOUNTS: Record<BaseRightType, { usdt: number; hashpowerPercent: number }> = {
  // 系统费用类
  [RightType.COST_FEE]: { usdt: 2880, hashpowerPercent: 0 },
  [RightType.OPERATION_FEE]: { usdt: 2100, hashpowerPercent: 0 },
  [RightType.HEADQUARTERS_BASE_FEE]: { usdt: 123, hashpowerPercent: 0 },
  [RightType.RWAD_POOL_INJECTION]: { usdt: 5760, hashpowerPercent: 0 },

  // 用户权益类
  [RightType.SHARE_RIGHT]: { usdt: 3600, hashpowerPercent: 0 },
  [RightType.PROVINCE_AREA_RIGHT]: { usdt: 108, hashpowerPercent: 1 },
  [RightType.PROVINCE_TEAM_RIGHT]: { usdt: 144, hashpowerPercent: 0 },
  [RightType.CITY_AREA_RIGHT]: { usdt: 252, hashpowerPercent: 2 },
  [RightType.CITY_TEAM_RIGHT]: { usdt: 288, hashpowerPercent: 0 },
  [RightType.COMMUNITY_RIGHT]: { usdt: 576, hashpowerPercent: 0 },
};

// 总金额验证: 2880 + 2100 + 123 + 5760 + 3600 + 108 + 144 + 252 + 288 + 576 = 15831 USDT
