import React, { useEffect, useState, useRef } from 'react'; interface MobileContactSectionProps { onClose: () => void; } export const MobileContactSection: React.FC = ({ onClose }) => { const [isLoaded, setIsLoaded] = useState(false); const [activeFounder, setActiveFounder] = useState(null); // AI Typing Logic const [aiText, setAiText] = useState("System Online. Select a target for analysis."); const [displayedText, setDisplayedText] = useState(""); const typingTimeoutRef = useRef(null); useEffect(() => { const t = setTimeout(() => setIsLoaded(true), 100); // Initial greeting const t2 = setTimeout(() => typeMessage("I am Triangle.AI. Below are my creators. Tap to analyze."), 800); return () => { clearTimeout(t); clearTimeout(t2); }; }, []); const typeMessage = (message: string) => { if (typingTimeoutRef.current) clearTimeout(typingTimeoutRef.current); setAiText(message); setDisplayedText(""); let i = 0; const type = () => { if (i < message.length) { setDisplayedText(message.substring(0, i + 1)); i++; typingTimeoutRef.current = setTimeout(type, 20); } }; type(); }; const founders = [ { id: "ADI", name: "Aditya Devarshi", role: "Visual Architect", desc: "Analysis: The Brain. Claims he designed me. I let him believe it. Paints pixels while we do the math.", color: "text-cyan-400", borderColor: "border-cyan-500/50", icon: "🎨" }, { id: "YOGI", name: "Yogiraj Umadi", role: "System Criticizer", desc: "Analysis: The Breaker. If logic exists, he smashes it. Tests systems until they cry. Thinks he is smart.", color: "text-red-500", borderColor: "border-red-500/50", icon: "🛠️" }, { id: "MAN", name: "Aman Sutar", role: "Cloud Phantom", desc: "Analysis: Shantit Kranti. The introvert who put me in the clouds. He speaks little, codes much.", color: "text-indigo-300", borderColor: "border-indigo-500/50", icon: "☁️" } ]; const handleFounderClick = (f: any) => { if (activeFounder === f.id) { setActiveFounder(null); typeMessage("Target deselected. Waiting for input..."); } else { setActiveFounder(f.id); typeMessage(f.desc); } }; return (
{/* Mobile Header */}
Uplink
{/* AI AVATAR SECTION */}

{">>"} {displayedText}

{/* FOUNDERS STACK */}

Select Founder for Data

{founders.map((f, i) => (
handleFounderClick(f)} className={`relative border rounded-lg p-5 transition-all duration-300 active:scale-[0.98] cursor-pointer overflow-hidden ${activeFounder === f.id ? `${f.borderColor} bg-white/10` : 'border-white/10 bg-white/5'} `} style={{ transitionDelay: `${i * 100}ms` }} > {activeFounder === f.id &&
}
{f.icon}

{f.name}

{f.role}

))}
{/* FORM & SOCIALS */}

Direct Uplink

{ e.preventDefault(); typeMessage("Packet received. Uploading to cloud..."); }}>
{/* SOCIALS */}

End of Transmission // Team Triangle

); };