"use client"; import { useState } from "react"; import { Plus, Search, FileText, File, Image, Music, Video, MoreHorizontal, Download, Share2, Trash2, Eye, Layout, List, Brain, Clock, ChevronRight, X, Folder, HardDrive, Shield, Cloud, Tag, Info, Star, Filter, Zap, Globe, ExternalLink, Activity } from "lucide-react"; import { motion, AnimatePresence } from "framer-motion"; // Mock Data const documents = [ { id: 1, name: "Marketing Strategy 2026.pdf", type: "PDF", size: "2.4 MB", date: "May 10, 2026", category: "Strategy", starred: true, summary: "Comprehensive roadmap for Q3 marketing funnels and ad spend allocation.", owner: "Sarah J.", tags: ["Marketing", "Strategy", "Q3"], aiAnalysis: "This document outlines a 15% increase in digital spend. Key focus is on video-first content." }, { id: 2, name: "Project Brand Identity.fig", type: "FIG", size: "15.8 MB", date: "May 08, 2026", category: "Design", starred: false, summary: "Core design tokens, typography, and color palette for the Revanios rebrand.", owner: "Alex R.", tags: ["Design", "UI", "Branding"], aiAnalysis: "Identifies 'Cyber-Lavender' as the primary action color. Typography is set to Geist Sans." }, { id: 3, name: "Client Contracts Bundle.zip", type: "ZIP", size: "4.2 MB", date: "May 05, 2026", category: "Legal", starred: true, summary: "Collection of signed service agreements for the top 5 enterprise clients.", owner: "Emma W.", tags: ["Legal", "Enterprise"] }, { id: 4, name: "Revenue Forecast Q3.xlsx", type: "XLSX", size: "1.1 MB", date: "May 01, 2026", category: "Finance", starred: false, summary: "Predicted revenue growth based on current subscription trends and churn rates.", owner: "Sarah J.", tags: ["Finance", "Data"] }, { id: 5, name: "User Research Session 01.mp4", type: "MP4", size: "142 MB", date: "Apr 28, 2026", category: "Research", starred: false, summary: "Interview with primary persona 'Executive Alex' regarding workflow pain points.", owner: "Mike C.", tags: ["Research", "User-Test"] }, ]; const storageStats = [ { label: "Documents", size: "1.2 GB", color: "bg-primary", percentage: 65 }, { label: "Media", size: "800 MB", color: "bg-blue-500", percentage: 25 }, { label: "Others", size: "400 MB", color: "bg-white/20", percentage: 10 }, ]; export default function DocumentsPage() { const [viewMode, setViewMode] = useState<"grid" | "list">("grid"); const [selectedDoc, setSelectedDoc] = useState(null); const [activeFolder, setActiveFolder] = useState("All Files"); return (
{/* Top Header */}

Resources / Documents & Drive

{[1, 2, 3].map(i =>
U{i}
)}
Shared with team
{/* Left Sidebar: Navigation & Storage */}
{["All Files", "Recent", "Starred", "Shared", "Trash"].map(folder => ( ))}

Storage Usage

2.4 GB / 10 GB 24%
{storageStats.map(stat => (
))}
{storageStats.map(stat => (
{stat.label}
{stat.size}
))}

AI Librarian

"Your 'Legal' folder is 80% redundant. Should I suggest an automated cleanup strategy?"

{/* Main Content Area */}
{["All", "PDF", "Design", "Media"].map(f => ( ))}
{viewMode === "grid" ? (
{documents.map((doc) => ( setSelectedDoc(doc)} className="bg-[#0A0710] border border-white/5 rounded-sm p-6 flex flex-col group relative overflow-hidden shadow-2xl transition-all hover:border-primary/40 cursor-pointer" >
{doc.name}
{doc.type} • {doc.size} {doc.date.split(',')[0]}
))}
) : (
Document Name
File Weight
Ownership
Strategic Date
{documents.map(doc => (
setSelectedDoc(doc)} className="grid grid-cols-12 gap-4 p-6 items-center hover:bg-white/[0.02] transition-all group cursor-pointer border-l-2 border-transparent hover:border-primary">
{doc.name}
{doc.category} {doc.starred && }
{doc.size}
{doc.owner}
{doc.date.split(',')[0]}
))}
)}
{/* Document Detail Sheet */} {selectedDoc && ( <> setSelectedDoc(null)} className="fixed inset-0 bg-black/90 backdrop-blur-xl z-[100]" />

{selectedDoc.name}

{selectedDoc.type} {selectedDoc.size} {selectedDoc.starred && }
{/* AI Summary Section */}

Strategic Content Intelligence

"{selectedDoc.summary}"

{selectedDoc.aiAnalysis && (
High-Level Insight

{selectedDoc.aiAnalysis}

)}
{/* Metadata & Actions */}

File Properties

Strategic Tags

{selectedDoc.tags?.map((tag: string) => ( {tag} ))}
{/* Connected Ecosystem */}

Strategic Ecosystem

Linked by AI
Project: Q3 Expansion
Referenced in Section 4.2
Goal: Market Dominance
Foundational Resource
)}
); } function DocIcon({ type, small = false }: { type: string, small?: boolean }) { const sizeClass = small ? "h-6 w-6" : "h-14 w-14"; if (["PDF", "XLSX"].includes(type)) return ; if (["FIG"].includes(type)) return ; if (["MP4"].includes(type)) return