import React, { useEffect, useRef } from 'react'; import { motion, animate } from 'motion/react'; import { Check, Zap, ShieldCheck, BarChart3, BrainCircuit, History, UserPlus, Sparkles, ArrowRight, Target, Trophy, Users } from 'lucide-react'; import { cn } from '../lib/utils'; // Animated Counter Component const AnimatedCounter = ({ from, to, suffix = "", prefix = "", decimal = false, duration = 2 }: { from: number, to: number, suffix?: string, prefix?: string, decimal?: boolean, duration?: number }) => { const nodeRef = useRef(null); useEffect(() => { const node = nodeRef.current; if (node) { const controls = animate(from, to, { duration, ease: "easeOut", onUpdate(value) { const formattedValue = decimal ? value.toFixed(1) : Math.round(value).toString(); node.textContent = `${prefix}${formattedValue}${suffix}`; } }); return () => controls.stop(); } }, [from, to, suffix, prefix, duration, decimal]); return {prefix}{from}{suffix}; }; interface PlansViewProps { isUnauthenticated?: boolean; onGetStarted?: () => void; onBack?: () => void; } const PlanCard = ({ title, price, description, features, buttonText, highlight = false, badge = "", onClick }: { title: string; price: string; description: string; features: string[]; buttonText: string; highlight?: boolean; badge?: string; onClick?: () => void; }) => ( {badge && (
{badge}
)}

{title}

{price} {title !== "Plano Free" ? "/ mês" : ""}

{description}

{features.map((feature, idx) => (
{feature}
))}
); export const PlansView: React.FC = ({ isUnauthenticated, onGetStarted, onBack }) => { const containerVariants = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1 } } }; const itemVariants = { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0 } }; const handleAction = () => { if (isUnauthenticated && onGetStarted) { onGetStarted(); } else { // Handle payment or subscription logic for logged in users window.open('https://wa.me/258869976193?text=Ol%C3%A1%2C%20gostaria%20de%20assinar%20o%20plano%20do%20QuantScan', '_blank'); } }; return (
{/* Background Image requested by user */}
Background
{/* Slight overlay for readability */}
{!isUnauthenticated && (
)} {isUnauthenticated && ( )} {/* 1. HERO SECTION - Only show prominently if unauthenticated */} {isUnauthenticated ? (
Hero Background
Logo
Acesso Premium Pro Logic

Transforme análise em decisão.
Pro Logic em lucro.

IA que analisa gráficos e entrega sinais com probabilidade real. Pare de adivinhar cada trade.

) : (

Escolha seu Upgrade

Potencialize seus resultados com PRO Logic

)} {/* 2. PLANOS */}
{/* 3. BENEFÍCIOS PRINCIPAIS */}
{[ { icon: Target, title: "Score real", desc: "0-100%" }, { icon: BrainCircuit, title: "PRO Logic", desc: "Fluxo Pro" }, { icon: Sparkles, title: "Scan Visual", desc: "IA Imagem" }, { icon: Zap, title: "Ultra Fast", desc: "Resposta" }, { icon: History, title: "Backtest", desc: "Histórico" }, { icon: ShieldCheck, title: "Elite", desc: "Segurança" }, ].map((benefit, idx) => (

{benefit.title}

{benefit.desc}

))}
{/* 4. COMPARAÇÃO DE PLANOS - Only show if not on very small screen or specifically requested */}

Comparativo Técnico

{[ { label: "Nº de Análises", free: "8 / dia", pro: "15 / dia", elite: "30 / dia", lifetime: "Ilimitado" }, { label: "Score de Probabilidade", free: "Básico", pro: "Avançado", elite: "Avançado+", lifetime: "Avançado+" }, { label: "IA Adaptativa", free: "Não", pro: "Sim", elite: "Sim", lifetime: "Sim" }, { label: "Histórico de Sinais", free: "Limitado", pro: "Completo", elite: "Completo", lifetime: "Completo" }, { label: "Suporte", free: "Comunidade", pro: "Prioritário", elite: "VIP Individual", lifetime: "Premium 1-on-1" }, { label: "Processamento", free: "Normal", pro: "Rápido", elite: "Ultra Prioridade", lifetime: "Ultra Prioridade" }, ].map((row, idx) => ( ))}
Funcionalidade Begin Pro Elite Lifetime
{row.label} {row.free} {row.pro} {row.elite} {row.lifetime}
{/* 5. PROVA SOCIAL */}
Análises realizadas
Taxa média de acerto
Tempo de resposta IA
{/* 6. FINAL CTA */}

Pare de adivinhar.
Comece a decidir com dados.

Começar Agora
); };