import React, { useState, useEffect } from 'react'; import { Heart, Star, Users, Clock, BookOpen, CheckCircle } from 'lucide-react'; const CourseSubscription = () => { const [selectedAmount, setSelectedAmount] = useState(29); const [isAnimating, setIsAnimating] = useState(false); const [showSuccess, setShowSuccess] = useState(false); const suggestedPrice = 29; const maxPrice = 100; const handleAmountChange = (value) => { setSelectedAmount(value); setIsAnimating(true); setTimeout(() => setIsAnimating(false), 200); }; const handleSubscribe = () => { setShowSuccess(true); setTimeout(() => setShowSuccess(false), 3000); }; const getSliderColor = () => { if (selectedAmount === 0) return 'from-green-500 to-green-600'; if (selectedAmount < suggestedPrice) return 'from-orange-400 to-orange-500'; return 'from-orange-500 to-red-500'; }; const getButtonText = () => { if (selectedAmount === 0) return 'Acessar Gratuitamente'; return `Assinar por R$ ${selectedAmount}`; }; const getMotivationalText = () => { if (selectedAmount === 0) return 'Acesso gratuito disponível! 🎉'; if (selectedAmount < suggestedPrice) return 'Obrigado pelo seu apoio! 💛'; if (selectedAmount === suggestedPrice) return 'Valor sugerido - Perfeito! ⭐'; return 'Você é incrível! Muito obrigado! 🚀'; }; return (
{/* Card Principal */}
{/* Header do Curso */}

Curso Completo Papi Simulator

Aprenda a explorar o mundo da Polkadot

{/* Estatísticas do Curso */}
2.5k+
Alunos
15h
Conteúdo
4.9
Avaliação
{/* Seção de Preço */}
Quanto você gostaria de contribuir?
{selectedAmount === 0 ? 'Grátis' : `R$ ${selectedAmount}`}
Sugerido: R$ {suggestedPrice}
{/* Slider Personalizado */}
handleAmountChange(parseInt(e.target.value))} className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider" style={{ background: `linear-gradient(to right, rgb(249, 115, 22) 0%, rgb(239, 68, 68) ${(selectedAmount / maxPrice) * 100}%, rgb(229, 231, 235) ${(selectedAmount / maxPrice) * 100}%, rgb(229, 231, 235) 100%)` }} />
R$ 0 R$ {maxPrice}
{/* Valores Rápidos */}
{[0, 15, 29, 50].map((amount) => ( ))}
{/* Texto Motivacional */}
{getMotivationalText()}
{/* Botão de Assinatura */} {/* Benefícios */}
✓ Acesso vitalício • ✓ Certificado • ✓ Suporte da comunidade
{/* Mensagem de Apoio */}
Este curso é feito com amor para a comunidade
); }; export default CourseSubscription;