import { useState } from "react"; import { useNavigate } from "react-router-dom"; import Layout from "@/components/Layout"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { MessageSquare, Send, ExternalLink, Hash, Lock } from "lucide-react"; const CHANNELS = [ { id: 1, name: "general", type: "public", members: 12, unread: 3 }, { id: 2, name: "engineering", type: "public", members: 8, unread: 0 }, { id: 3, name: "operations", type: "public", members: 5, unread: 1 }, { id: 4, name: "announcements", type: "locked", members: 15, unread: 2 }, ]; const MESSAGES = [ { id: 1, author: "John Founder", content: "Welcome to the AeThex staff chat!", timestamp: "10:30 AM", isOwn: false, }, { id: 2, author: "Sarah Dev", content: "Great to have everyone here", timestamp: "10:32 AM", isOwn: false, }, { id: 3, author: "You", content: "Looking forward to collaborating", timestamp: "10:35 AM", isOwn: true, }, ]; export default function StaffChat() { const navigate = useNavigate(); const [selectedChannel, setSelectedChannel] = useState(CHANNELS[0]); const [message, setMessage] = useState(""); const handleSend = () => { if (message.trim()) { setMessage(""); } }; return (

Staff Chat

Internal team communication

{/* Channels Sidebar */} Channels {CHANNELS.map((channel) => ( ))} {/* Chat Area */} {/* Channel Header */} {selectedChannel.type === "locked" ? ( ) : ( )} {selectedChannel.name} {/* Messages */} {MESSAGES.map((msg) => (
{!msg.isOwn && (

{msg.author}

)}

{msg.content}

{msg.timestamp}

))}
{/* Input */}
setMessage(e.target.value)} onKeyPress={(e) => e.key === "Enter" && handleSend()} className="bg-slate-800/50 border-purple-500/20 text-white placeholder:text-gray-500" />
); }