"use client"; import { useMemo, useState } from "react"; type PricingTableProps = { lang: "es" | "en"; onContact: () => void; }; type Plan = { id: string; name: string; setup: string; monthly: number | null; term: string; features: string[]; optional: string[]; cta: string; popular?: boolean; subtext?: string; }; const formatMonthly = ( value: number, yearly: boolean, lang: PricingTableProps["lang"] ) => { const discounted = yearly ? Math.round(value * 0.85) : value; return `${discounted} €/${lang === "es" ? "mes" : "mo"}`; }; export default function PricingTable({ lang, onContact }: PricingTableProps) { const [yearly, setYearly] = useState(false); const [showFairUse, setShowFairUse] = useState(false); const pricingContent = useMemo( () => ({ es: { labels: { popular: "Más popular", setup: "Instalación", billedAnnually: "(facturado anualmente)", }, plans: [ { id: "starter", name: "Smart Starter", setup: "900 €", monthly: 299, term: "6-12 meses", features: [ "Chat IA en la web (1 idioma)", "Reservas y captación de leads", "Bandeja ligera de leads", "Analíticas básicas", ], optional: ["+WhatsApp (+100€/mes)", "+Idioma extra (+80€/mes)"], cta: "Empezar", }, { id: "site", name: "Smart Site", setup: "3.500 €", monthly: 749, term: "6-12 meses", features: [ "Todo lo incluido en Starter", "Nuevo sitio web Next.js", "WhatsApp incluido", "2 idiomas (ES+EN)", "Sugerencias de contenido con IA", "Analíticas avanzadas", ], optional: [ "+Llamadas de voz (+150€/mes)", "+Ubicación extra (+120€/mes)", ], cta: "Empezar", popular: true, }, { id: "growth", name: "AI Growth Partner", setup: "5.000 €", monthly: 1950, term: "12 meses", features: [ "Todo lo incluido en Smart Site", "Llamadas de voz incluidas", "Soporte multiubicación", "Integraciones CRM", "Automatizaciones personalizadas", "Llamada estratégica mensual", "Soporte prioritario", ], optional: ["+Pack de contenido IA (+200€/mes)"], cta: "Empezar", }, { id: "enterprise", name: "Enterprise / A medida", setup: "Personalizado", monthly: null, term: "Definimos el alcance contigo", features: [ "Todo a medida", "Multimarca y white-label", "Account manager dedicado", "SLA de rendimiento", ], optional: [], cta: "Contactar", subtext: "Hablemos", }, ] satisfies Plan[], }, en: { labels: { popular: "Most popular", setup: "Setup", billedAnnually: "(billed annually)", }, plans: [ { id: "starter", name: "Smart Starter", setup: "900 €", monthly: 299, term: "6-12 months", features: [ "AI website chat (1 language)", "Booking & lead capture", "Light lead inbox", "Basic analytics", ], optional: ["+WhatsApp (+100€/mo)", "+Extra language (+80€/mo)"], cta: "Get started", }, { id: "site", name: "Smart Site", setup: "3,500 €", monthly: 749, term: "6-12 months", features: [ "Everything in Starter", "New Next.js website", "WhatsApp included", "2 languages (ES+EN)", "AI content suggestions", "Advanced analytics", ], optional: ["+Voice calls (+150€/mo)", "+Extra location (+120€/mo)"], cta: "Get started", popular: true, }, { id: "growth", name: "AI Growth Partner", setup: "5,000 €", monthly: 1950, term: "12 months", features: [ "Everything in Smart Site", "Voice calls included", "Multi-location support", "CRM integrations", "Custom automations", "Monthly strategy call", "Priority support", ], optional: ["+AI content pack (+200€/mo)"], cta: "Get started", }, { id: "enterprise", name: "Enterprise / Custom", setup: "Custom", monthly: null, term: "Let us scope it", features: [ "Everything tailored", "Multi-brand & white-label", "Dedicated account manager", "Performance SLAs", ], optional: [], cta: "Contact us", subtext: "Let us talk", }, ] satisfies Plan[], }, }), [] ); const pricing = pricingContent[lang]; const plans = pricing.plans; return (
{lang === "es" ? "Pago anual" : "Pay yearly"}
{lang === "es" ? "Paga anual y ahorra 15%" : "Pay yearly - Save 15%"}
{pricing.labels.setup}: {plan.setup}
{plan.monthly === null ? plan.subtext : formatMonthly(plan.monthly, yearly, lang)}
{plan.term} {plan.monthly !== null && yearly && ( {pricing.labels.billedAnnually} )}
{option}
))}Todos los planes incluyen un uso generoso de IA para un negocio típico. Se aplica una{" "} , sin cargos sorpresa.
{showFairUse && (Uso justo
Cada plan incluye suficientes mensajes de IA, llamadas y conversaciones de WhatsApp para un negocio típico de tu tamaño.
Si tu uso se mantiene muy por encima de lo normal (por ejemplo, porque añades nuevas marcas, locales o campañas), haremos lo siguiente:
Nunca aplicamos cargos extra sin hablar contigo antes.