import React, { useState } from 'react'; import { Button } from '../ui/button'; import { LiveStream } from '../../types'; import { Users, Heart, Share2, DollarSign, Send, Radio, Settings, ArrowLeft, } from 'lucide-react'; import { useToast } from '../../context/ToastContext'; import { TipStreamerModal } from './modals/TipStreamerModal'; interface LiveStreamDetailViewProps { streamId: string; onBack: () => void; } // Mock Stream Data const MOCK_STREAM: LiveStream = { id: 's1', title: 'Late Night DnB Production 🎧 | Feedback Session', streamer: 'Neuro_Glitch', viewers: 1240, thumbnailUrl: 'https://picsum.photos/id/140/1200/800', tags: ['Production', 'Ableton', 'DnB'], isLive: true, category: 'Production', }; export const LiveStreamDetailView: React.FC = ({ streamId: _streamId, onBack, }) => { const { addToast } = useToast(); const [chatInput, setChatInput] = useState(''); const [showTipModal, setShowTipModal] = useState(false); const [messages, setMessages] = useState([ { id: 1, user: 'BassHead99', text: 'That Reese bass is filthy! 🤮🔥', color: 'text-kodo-cyan', }, { id: 2, user: 'Studio_Rat', text: 'What VST is that?', color: 'text-kodo-content-dim', }, { id: 3, user: 'Neuro_Glitch', text: "It's Phase Plant, just initializing now.", color: 'text-kodo-gold font-bold', }, ]); const handleSendChat = () => { if (!chatInput.trim()) return; setMessages([ ...messages, { id: Date.now(), user: 'You', text: chatInput, color: 'text-white' }, ]); setChatInput(''); }; const handleTip = (amount: number, message: string) => { addToast(`Sent $${amount} to ${MOCK_STREAM.streamer}`, 'success'); setMessages([ ...messages, { id: Date.now(), user: 'System', text: `You tipped $${amount}: ${message}`, color: 'text-kodo-lime font-bold italic', }, ]); }; return (
{/* Header Overlay (Fade in/out logic usually here) */}
{/* Video Player Area */}
{/* Simulated Video */}
{/* Stream Info Overlay */}

{MOCK_STREAM.title}

{MOCK_STREAM.streamer} LIVE {' '} {MOCK_STREAM.viewers.toLocaleString()}
{/* Chat Sidebar */}

LIVE CHAT

{messages.map((msg) => (
{msg.user}: {msg.text}
))}
setChatInput(e.target.value)} onKeyDown={(e) => e.key === 'Enter' && handleSendChat()} />
Slow Mode: Off
{showTipModal && ( setShowTipModal(false)} onSend={handleTip} /> )}
); };