import React, { useState, useEffect, useRef } from 'react';
import {
Play, Pause, SkipForward, SkipBack, Heart, Share2,
ShoppingBag, Trophy, User, Settings, BarChart3,
Users, Radio, Music, Gift, ShieldCheck, MapPin,
LogOut, Menu, X, ChevronRight, Upload, Calendar,
CreditCard, DollarSign, Activity, CheckCircle,
Smartphone, Monitor, Globe, Search, Lock, Star,
Headphones, Crown, Award, Image, Video
} from 'lucide-react';
// --- MOCK DATA & CONFIG ---
const ARTIST_NAME = "LEONE STAR";
const THEME_COLOR = "purple";
// Mock de Músicas
const RADIO_PLAYLIST = [
{ id: 1, title: "Horizonte Azul", artist: ARTIST_NAME, duration: "3:45", plays: 12500 },
{ id: 2, title: "Sem Olhar pra Trás", artist: ARTIST_NAME, duration: "2:50", plays: 8900 },
{ id: 3, title: "A Noite é Nossa", artist: ARTIST_NAME, duration: "4:10", plays: 15600 },
];
// Mock de Missões Robustas
const MISSIONS = [
{ id: 1, title: "Story com a música nova", points: 100, type: "daily", status: "pending", requiresUpload: true, platform: "Instagram" },
{ id: 2, title: "Seguir no Spotify", points: 50, type: "one-time", status: "completed", requiresUpload: false, platform: "Spotify" },
{ id: 3, title: "Ouvir 'Horizonte' 5x", points: 250, type: "weekly", status: "pending", requiresUpload: false, platform: "App" },
{ id: 4, title: "Comprar Camiseta Tour", points: 1000, type: "monthly", status: "pending", requiresUpload: false, platform: "Store" },
];
// Mock de Produtos da Loja
const PRODUCTS = [
{ id: 1, name: "Camiseta Tour 2026", price: 89.90, image: "shirt", stock: 150, rating: 4.8 },
{ id: 2, name: "Boné Aba Reta LS", price: 59.90, image: "cap", stock: 45, rating: 5.0 },
{ id: 3, name: "Copo Térmico", price: 45.00, image: "cup", stock: 0, rating: 4.5 },
{ id: 4, name: "Ingresso VIP (Meet)", price: 250.00, image: "ticket", stock: 10, rating: 5.0 },
];
// Mock de Ranking
const RANKING_DATA = [
{ id: 1, name: "Mariana Silva", points: 15420, avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Mariana", level: "Diamante" },
{ id: 2, name: "João Pedro", points: 12350, avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Joao", level: "Ouro" },
{ id: 3, name: "Ana Clara", points: 11200, avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Ana", level: "Ouro" },
{ id: 4, name: "Carlos Edu", points: 9800, avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Carlos", level: "Prata" },
{ id: 5, name: "Bia Santos", points: 8500, avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Bia", level: "Prata" },
];
// --- COMPONENTS ---
// 1. LANDING PAGE REFINED
const LandingPage = ({ onEnter }) => {
return (
{/* Background Video Simulator - Imagem estática simulando frame de vídeo */}
{ARTIST_NAME}
A revolução da música começa aqui.
{/* Plataformas */}
PLATAFORMA OFICIAL • PWA 2.0
);
};
// 2. SMART REGISTRATION FLOW
const Registration = ({ onComplete }) => {
const [step, setStep] = useState(1);
const [loading, setLoading] = useState(false);
const [formData, setFormData] = useState({
cpf: '', name: '', birthDate: '', nickname: '', cep: '', address: '',
email: '', whatsapp: '', password: '',
socials: { instagram: '', tiktok: '', spotify: false, deezer: false }
});
const simulateFetch = (field, delay = 800) => {
setLoading(true);
setTimeout(() => {
setLoading(false);
if (field === 'cpf') setFormData(prev => ({ ...prev, name: "Leone Pataíba", birthDate: "1990-05-20" }));
if (field === 'cep') setFormData(prev => ({ ...prev, address: "Rua dos Artistas, 123 - Centro, Salvador/BA" }));
}, delay);
};
return (
{/* Progress Bar */}
Identificação
Localização
Acesso
{step === 1 && (
Vamos começar!
setFormData({...formData, cpf: e.target.value})}
onBlur={() => formData.cpf.length > 3 && simulateFetch('cpf')}
placeholder="000.000.000-00"
className="w-full bg-gray-800 border border-gray-700 rounded-xl p-4 text-lg focus:border-purple-500 outline-none transition-colors"
/>
{loading ? (
Buscando dados na Receita...
) : formData.name && (
Nome Completo
{formData.name}
Data de Nascimento
{formData.birthDate}
)}
)}
{step === 2 && (
)}
{step === 3 && (
)}
);
};
// 3. WELCOME EXPERIENCE
const WelcomeVideo = ({ onFinish }) => {
return (
{/* Mock Video Placeholder */}
Parabéns por se cadastrar!
Mensagem exclusiva do {ARTIST_NAME}
"Olá! Fico muito feliz em ter você aqui. Preparei conteúdos exclusivos, missões e prêmios que você só encontra neste app. Vamos juntos nessa jornada!"
);
};
// 4. ARTIST APP (FAN VIEW)
const AppHeader = ({ onViewChange }) => (
onViewChange('home')}>
L
{ARTIST_NAME}
Official App
onViewChange('admin')}>
{/* Bottom Nav for Mobile - Integrated into header for simplicity in this prototype */}
);
const RadioBar = ({ isPlaying, setIsPlaying }) => (
Horizonte Azul
Leone Star • Ao Vivo
);
// --- VIEWS CONTENT ---
const HomeView = () => (
{/* Hero Banners */}
LANÇAMENTO
Ecos do Amanhã
{/* Section: Latest */}
Feed do Artista
{[1,2,3].map(i => (
Leone Star
@leonestar • 2h atrás
Galera, quem aí já garantiu o ingresso pro show de SP? O lote vira amanhã! 🚀 #Tour2026
2.4k
Share
))}
);
const MissionsView = () => (
Central de Missões
Reseta em: 04:23:10
{MISSIONS.map((mission) => (
{mission.status === 'completed' &&
COMPLETADA
}
{mission.requiresUpload ?
:
}
{mission.title}
Plataforma: {mission.platform} • +{mission.points} pts
{mission.status !== 'completed' && (
{mission.requiresUpload && (
)}
)}
))}
);
const StoreView = () => (
Loja Oficial
{PRODUCTS.map(product => (
{product.stock === 0 && (
ESGOTADO
)}
{product.name}
{product.rating}
R$ {product.price.toFixed(2)}
))}
);
const RankingView = () => (
Liga Diamante
Termina em 6 dias
{RANKING_DATA.map((user, index) => (
{index + 1}
{user.points.toLocaleString()} pts
))}
);
// 5. MASTER & ADMIN DASHBOARD
const AdminPanel = ({ onExit }) => {
const [role, setRole] = useState('MASTER'); // MASTER or MANAGER
const [tab, setTab] = useState('crm');
return (
{/* Sidebar */}
AMBIENTE
{/* Content Area */}
{tab === 'crm' && (
CRM de Fãs
Gerenciamento granular da base de dados.
{/* Filters Mock */}
Todos Estados
Todos Devices
Apenas VIPs
| Usuário |
Localização |
Dispositivo / IP |
Engajamento |
Ações |
{[1,2,3,4,5,6].map((i) => (
Fã Exemplo {i}
fa{i}@email.com
|
São Paulo, SP
Último: 2h atrás
|
iPhone 14
192.168.0.{i}5
|
12.500 pts
Alto Risco
|
|
))}
)}
{tab === 'dash' && (
Dashboard Visual Placeholder
(Mesma estrutura do código anterior, focado no CRM agora)
)}
);
};
// 6. MAIN CONTROLLER
// Simula TargetIcon pois lucide-react pode não ter exportado corretamente dependendo da versão
const TargetIcon = (props) => (
);
export default function App() {
const [currentView, setCurrentView] = useState('landing');
const [isPlaying, setIsPlaying] = useState(false);
const [showWelcome, setShowWelcome] = useState(false);
const startRegistration = () => setCurrentView('register');
const finishRegistration = () => {
setCurrentView('home');
setShowWelcome(true);
};
// Helper to change view inside the App context
const handleAppNav = (view) => {
if(view === 'admin') setCurrentView('admin');
else setCurrentView(view);
};
if (currentView === 'landing') return ;
if (currentView === 'register') return ;
if (currentView === 'admin') return setCurrentView('home')} />;
// App Layout (Authenticated)
return (
{currentView === 'home' && }
{currentView === 'missions' && }
{currentView === 'store' && }
{currentView === 'ranking' && }
{showWelcome &&
setShowWelcome(false)} />}
);
}