import { getRenamePrice, getCustomizePrice, getChangeRacePrice, getChangeFactionPrice, getLevelUpPrice, } from './prices' export interface PaidServiceConfig { command: (character: string) => string getPrice: () => Promise productName: (character: string) => string } // Servicios de personaje de pago. slug = ruta (/rename, /customize, ...) y clave de // catálogo (Paid.). Comandos SOAP tal cual las success views de Django. export const PAID_SERVICES: Record = { rename: { command: (c) => `.char rename ${c}`, getPrice: getRenamePrice, productName: (c) => `Renombrar personaje: ${c}`, }, customize: { command: (c) => `.char customi ${c}`, getPrice: getCustomizePrice, productName: (c) => `Personalizar personaje: ${c}`, }, 'change-race': { command: (c) => `.char changerace ${c}`, getPrice: getChangeRacePrice, productName: (c) => `Cambiar raza: ${c}`, }, 'change-faction': { command: (c) => `.char changef ${c}`, getPrice: getChangeFactionPrice, productName: (c) => `Cambiar facción: ${c}`, }, 'level-up': { command: (c) => `.char level ${c} 80`, getPrice: getLevelUpPrice, productName: (c) => `Subir a nivel 80: ${c}`, }, } export function getPaidService(slug: string): PaidServiceConfig | null { return PAID_SERVICES[slug] ?? null }