'use client' import { motion } from 'framer-motion' import { ExternalLink, MessageSquare } from 'lucide-react' import { useTerminal } from '@/lib/TerminalContext' interface ProjectShowcaseProps { id?: string title: string description: string longDescription?: string stat: string highlight?: string status: 'live' | 'building' | 'planning' | 'completed' media?: { type: 'image' | 'video' url: string } videoUrl?: string articleUrl?: string watchVideoText?: string readArticleText?: string askPoimenText?: string bullets?: string[] deepDive?: { label: string url: string } } export function ProjectShowcase({ id, title, description, longDescription, stat, highlight, status, media, videoUrl, articleUrl, watchVideoText = 'Watch Video', readArticleText = 'Read Article', askPoimenText = 'Ask Poimen for technical details', bullets, deepDive, }: ProjectShowcaseProps) { const { setIsOpen } = useTerminal() const statusColors = { live: 'bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200', completed: 'bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200', building: 'bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200', planning: 'bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-200', } return ( {/* Optional Media (Image or Video) */} {media && (
{media.type === 'video' ? ( (() => { const youtubeMatch = media.url.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&]+)/) if (youtubeMatch) { return (