"use client"; import { useMemo, useState } from "react"; import { motion } from "framer-motion"; import PaymentButton from "@/components/stripe/PaymentButton"; type ServicesAndPricingProps = { lang: "es" | "en"; onContact: () => void; }; type ServiceCard = { id: string; icon: string; title: string; for: string; description: string[]; sections?: { title: string; items: string[] }[]; setup: string; monthly: number | null; term: string; features: string[]; optional: string[]; cta: string; popular?: boolean; subtext?: string; }; const fadeUp = { hidden: { opacity: 0, y: 24 }, visible: { opacity: 1, y: 0 }, }; const content = { es: { sectionTitle: "Servicios y Precios", sectionEyebrow: "Servicios y Precios", headline: "Convertimos tu web en un vendedor inteligente que trabaja 24/7", subheadline: "En 2026, los clientes esperan respuestas instantáneas, reservas sin fricción y experiencias personalizadas. Si tu web no puede hacerlo, están yendo a tu competencia.", yearlyLabel: "Pago anual", yearlyDesc: "Paga anual y ahorra 15%", saveLabel: "Descuento 15%", setupLabel: "Instalación", fromLabel: "Desde", perMonth: "/mes", billedAnnually: "(facturado anualmente)", examplesTitle: "Casos de uso reales en Costa del Sol", examplesCta: "Descubre tu plan ideal", fairUseNote: "Todos los planes incluyen un uso generoso de IA para un negocio típico. Se aplica una", fairUseLink: "política de uso justo", fairUseEnd: ", sin cargos sorpresa.", fairUseTitle: "Uso justo", fairUseQuestion: 'Qué significa "uso justo"?', close: "Cerrar", fairUseBody: [ "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:", ], fairUseList: [ "Te avisaremos primero.", "Te enviaremos un informe sencillo de uso.", "Te propondremos opciones (seguir igual con algunos límites o subir de plan / añadir más capacidad).", ], fairUseEndBody: "Nunca aplicamos cargos extra sin hablar contigo antes.", popular: "Más popular", }, en: { sectionTitle: "Services & Pricing", sectionEyebrow: "Services & Pricing", headline: "Turn your website into a 24/7 intelligent salesperson", subheadline: "In 2026, customers expect instant answers, frictionless bookings, and personalized experiences. If your site can't deliver, they're going to your competitors.", yearlyLabel: "Pay yearly", yearlyDesc: "Pay yearly - Save 15%", saveLabel: "Save 15%", setupLabel: "Setup", fromLabel: "From", perMonth: "/month", billedAnnually: "(billed annually)", examplesTitle: "Real use cases on the Costa del Sol", examplesCta: "Find your ideal plan", fairUseNote: "All plans include generous AI usage for a typical business. A", fairUseLink: "fair use policy", fairUseEnd: " applies, no surprise charges.", fairUseTitle: "Fair use", fairUseQuestion: 'What does "fair use" mean?', close: "Close", fairUseBody: [ "Each plan includes enough AI messages, calls and WhatsApp conversations for a typical business of your size.", "If your usage stays well above normal (e.g. you add new brands, locations or campaigns), we will:", ], fairUseList: [ "Notify you first.", "Send you a simple usage report.", "Propose options (continue as-is with some limits, or upgrade / add capacity).", ], fairUseEndBody: "We never apply extra charges without speaking to you first.", popular: "Most popular", }, } as const; const serviceCards: Record<"es" | "en", ServiceCard[]> = { es: [ { id: "starter", icon: "🤖", title: "Empleado IA - Chat", for: "Restaurantes, clínicas, negocios que quieren su primer empleado IA", description: [ "Un empleado virtual que trabaja 24/7, 365 días al año. Responde preguntas, toma reservas y captura leads mientras tú duermes.", ], sections: [ { title: "Un empleado IA que:", items: [ "Responde 24/7 (también a las 3 AM)", "Habla español, inglés, francés, alemán...", "Toma reservas y citas automáticas", "Nunca se enferma, nunca se va de vacaciones", ], }, ], setup: "900 €", monthly: 299, term: "6-12 meses", features: [ "🤖 Chat IA en tu web", "🌍 Hasta 3 idiomas", "📅 Reservas automáticas", "📊 Dashboard de clientes", "📱 Notificaciones WhatsApp/SMS", "📱 Notificaciones en tiempo real", ], optional: [], cta: "Empezar", }, { id: "site", icon: "📞", title: "Empleado IA - Chat + Voz", for: "Negocios que no quieren perder llamadas", description: [ "Tu empleado IA ahora también contesta el teléfono. Disponible 24/7 para responder, cualificar yivar llamadas a tu móvil o agendar directamente.", ], sections: [ { title: "Todo lo del plan Chat, más:", items: [ "📞 Contesta llamadas entrantes", "🎯 Cualifica leads por ti", "📋 Envía resúmenes post-llamada", "🔗 Integración con tu calendario", ], }, ], setup: "2.500 €", monthly: 599, term: "6-12 meses", features: [ "✅ Todo lo de Chat IA", "📞 Contesta llamadas", "🌍 Hasta 5 idiomas", "📅 Sincroniza con tu calendario", "📋 Resúmenes de conversaciones", ], optional: [], cta: "Empezar", popular: true, }, { id: "growth", icon: "🚀", title: "Empresa IA", for: "Cadenas, grupos o negocios con alto volumen", description: [ "IA para toda tu operación: múltiples ubicaciones, CRM, analytics avanzado y consultoría mensual para maximizar resultados.", ], sections: [ { title: "Incluye:", items: [ "Todo de Chat + Voz", "Múltiples ubicaciones", "CRM completo", "Analytics avanzado", "Consultoría mensual", ], }, ], setup: "5.000 €", monthly: 1499, term: "12 meses", features: [ "✅ Todo de Chat + Voz", "🏢 Múltiples ubicaciones", "🔗 Integraciones CRM", "📈 Analytics avanzado", "👤 Account manager dedicado", ], optional: [], cta: "Hablemos", }, { id: "enterprise", icon: "🎯", title: "Enterprise / A medida", for: "Operaciones a escala con necesidades custom", description: [ "Todo adaptado a tu operación: multimarca, white-label, account manager dedicado y SLA de rendimiento.", ], 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", }, ], en: [ { id: "starter", icon: "🤖", title: "AI Employee - Chat", for: "Restaurants, clinics, businesses wanting their first AI employee", description: [ "A virtual employee that works 24/7, 365 days a year. Answers questions, takes bookings and captures leads while you sleep.", ], sections: [ { title: "An AI employee that:", items: [ "Responds 24/7 (even at 3 AM)", "Speaks Spanish, English, French, German...", "Takes bookings and appointments automatically", "Never gets sick, never goes on vacation", ], }, ], setup: "€900", monthly: 299, term: "6-12 months", features: [ "🤖 AI Chat on your website", "🌍 Up to 3 languages", "📅 Automated bookings", "📊 Customer dashboard", "📱 Real-time notifications", ], optional: [], cta: "Get Started", }, { id: "site", icon: "📞", title: "AI Employee - Chat + Voice", for: "Businesses that can't miss calls", description: [ "Your AI employee now also answers the phone. Available 24/7 to respond, qualify, and forward calls to your mobile or book directly in your calendar.", ], sections: [ { title: "Everything in Chat plan, plus:", items: [ "📞 Answers incoming calls", "🎯 Qualifies leads for you", "📋 Post-call summaries", "🔗 Calendar integration", ], }, ], setup: "€2,500", monthly: 599, term: "6-12 months", features: [ "✅ Everything in Chat AI", "📞 Answers calls", "🌍 Up to 5 languages", "📅 Syncs with your calendar", "📋 Conversation summaries", ], optional: [], cta: "Get Started", popular: true, }, { id: "growth", icon: "🚀", title: "AI Company", for: "Chains, groups or high-volume businesses", description: [ "AI for your entire operation: multiple locations, CRM, advanced analytics and monthly consulting to maximize results.", ], sections: [ { title: "Includes:", items: [ "Everything in Chat + Voice", "Multiple locations", "Full CRM", "Advanced analytics", "Monthly consulting", ], }, ], setup: "€5,000", monthly: 1499, term: "12 months", features: [ "✅ Everything in Chat + Voice", "🏢 Multiple locations", "🔗 CRM integrations", "📈 Advanced analytics", "👤 Dedicated account manager", ], optional: [], cta: "Let's talk", }, { id: "enterprise", icon: "🎯", title: "Enterprise / Custom", for: "Large-scale operations with custom needs", description: [ "Everything tailored: multi-brand, white-label, dedicated account manager, performance SLA.", ], 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's talk", }, ], }; const examples = { es: [ { title: "🍽️ Restaurantes", text: "Reservas a las 3 AM, respuestas sobre alérgenos, sugerencias de platos." }, { title: "🏠 Inmobiliarias", text: "IA responde dudas, agenda visitas, cualifica leads." }, { title: "🚗 Rent a Car", text: "Cotiza y reserva en 3 idiomas sin intervención humana." }, ], en: [ { title: "🍽️ Restaurants", text: "Reservations at 3 AM, allergy answers, dish suggestions." }, { title: "🏠 Real Estate", text: "AI answers questions, books viewings, qualifies leads." }, { title: "🚗 Rent a Car", text: "Quote and book in 3 languages with no human intervention." }, ], }; export default function ServicesAndPricing({ lang, onContact, }: ServicesAndPricingProps) { const [yearly, setYearly] = useState(false); const [showFairUse, setShowFairUse] = useState(false); const t = content[lang]; const cards = serviceCards[lang]; const formatMonthly = (value: number) => { const price = yearly ? Math.round(value * 0.85) : value; return `${price} €${t.perMonth}`; }; return (

{t.sectionEyebrow}

{t.sectionTitle}

{t.subheadline}

{t.yearlyLabel}

{t.yearlyDesc}

{cards.map((card, index) => ( {card.popular && ( {t.popular} )}
{card.icon}

{card.title}

{card.for}

{card.description.map((p, i) => (

{p}

))}
{card.sections?.map((section) => (

{section.title}

    {section.items.map((item) => (
  • • {item}
  • ))}
))}

{t.setupLabel}: {card.setup}

{card.monthly === null ? card.subtext : card.monthly !== null ? `${t.fromLabel} ${formatMonthly(card.monthly)}` : null}

{card.term} {card.monthly !== null && yearly && ( {t.billedAnnually} )}

    {card.features.map((f) => (
  • ✓ {f}
  • ))}
{card.optional.length > 0 && (

{card.optional.join(" · ")}

)} {/* Enterprise/Custom plan: contact form, others: Stripe payment */} {card.id === "enterprise" ? ( ) : ( )}
))}

{t.examplesTitle}

{examples[lang].map((ex) => (

{ex.title}

"{ex.text}"

))}

{t.fairUseNote}{" "} {t.fairUseEnd}

{showFairUse && (
setShowFairUse(false)} />

{t.fairUseTitle}

{t.fairUseQuestion}

{t.fairUseBody.map((p) => (

{p}

))}
    {t.fairUseList.map((item) => (
  1. {item}
  2. ))}

{t.fairUseEndBody}

)}
); }