import React, { useState, useEffect } from 'react'; import { FileText, Mic, Image as ImageIcon, CheckCircle, Send, Clock, Search, User, Settings, Menu, X, Sparkles, ChevronRight, ChevronLeft, Save, Download, Upload, MessageSquare, BarChart3, ThumbsUp, ThumbsDown, AlertCircle, FileInput } from 'lucide-react'; // --- Mock Data & Constants --- const MOCK_IDFS = [ { id: 'IDF-2026-001', title: 'Adaptive Battery Management for EV Fleets', inventor: 'Sarah Chen', dateCreated: '2026-02-14', status: 'Pending Review', score: null, description: 'A system for optimizing battery charging cycles based on fleet route prediction.', problem: 'Current charging is static and degrades battery life.', solution: 'We use machine learning to predict daily usage and limit charge accordingly.', figures: ['sketch_01.jpg'] }, { id: 'IDF-2026-002', title: 'Holographic Display Overlay', inventor: 'Mike Ross', dateCreated: '2026-02-10', status: 'Approved', score: 85, description: 'Method for projecting 3D overlays on standard glass surfaces.', problem: 'AR requires expensive headsets.', solution: 'Micro-projectors embedded in the bezel with a specialized film.', figures: ['diagram_a.png'] }, { id: 'IDF-2026-003', title: 'Distributed Ledger for Supply Chain', inventor: 'Sarah Chen', dateCreated: '2026-01-22', status: 'Drafting', score: 92, description: 'Blockchain implementation for tracking pharmaceutical provenance.', problem: 'Counterfeit drugs entering the supply chain.', solution: 'Immutable ledger with IoT sensor integration.', figures: [] } ]; const AI_SUGGESTIONS = { polish: "The disclosed embodiment relates to a system and method for adaptive battery management in electric vehicle fleets. Specifically, the system utilizes predictive machine learning algorithms to analyze historical route data and determine optimal charging thresholds, thereby extending battery longevity while ensuring operational readiness.", clarification: "Could you specify the type of machine learning model used? (e.g., Neural Network, Random Forest) and what specific input parameters are collected from the vehicle?" }; // --- Components --- const Button = ({ children, onClick, variant = 'primary', icon: Icon, className = '', disabled = false }) => { const baseStyle = "flex items-center justify-center px-4 py-2 rounded-lg font-medium transition-all duration-200"; const variants = { primary: "bg-blue-600 text-white hover:bg-blue-700 shadow-sm hover:shadow-md disabled:bg-blue-300", secondary: "bg-white text-slate-700 border border-slate-200 hover:bg-slate-50 disabled:bg-slate-100", ghost: "text-slate-600 hover:bg-slate-100 disabled:text-slate-300", success: "bg-emerald-600 text-white hover:bg-emerald-700 shadow-sm", danger: "bg-red-600 text-white hover:bg-red-700 shadow-sm", ai: "bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-700 hover:to-indigo-700 shadow-md" }; return ( ); }; const Card = ({ children, className = '' }) => (
{children}
); const Badge = ({ status }) => { const styles = { 'Draft': 'bg-slate-100 text-slate-700', 'Pending Review': 'bg-amber-100 text-amber-800', 'Approved': 'bg-emerald-100 text-emerald-800', 'Rejected': 'bg-red-100 text-red-800', 'Drafting': 'bg-blue-100 text-blue-800' }; return ( {status} ); }; // --- Main Application --- export default function IIDPApp() { // State const [userRole, setUserRole] = useState(null); // 'inventor', 'reviewer', or null (login) const [activeTab, setActiveTab] = useState('dashboard'); const [idfs, setIdfs] = useState(MOCK_IDFS); const [currentIdf, setCurrentIdf] = useState(null); // --- Login Screen --- if (!userRole) { return (

StratIP Intelligent Platform

Secure Invention Disclosure & Review System

© 2026 StratIP Technologies. All rights reserved.

); } // --- Main Layout --- return (
{/* Sidebar */} {/* Main Content */}
{/* Header */}
StratIP

{activeTab === 'dashboard' ? 'Overview' : activeTab === 'new' ? 'New Invention Disclosure' : 'Disclosure Detail'}

{/* Scrollable Content Area */}
{currentIdf ? ( // Detail View (Reviewer or Edit Mode) setCurrentIdf(null)} onUpdate={(updated) => { setIdfs(idfs.map(i => i.id === updated.id ? updated : i)); setCurrentIdf(updated); }} /> ) : activeTab === 'new' ? ( // New Wizard setActiveTab('dashboard')} onComplete={(newIdf) => { setIdfs([newIdf, ...idfs]); setActiveTab('dashboard'); }} /> ) : ( // Dashboard List setCurrentIdf(idf)} /> )}
); } // --- Sub-Components --- const SidebarItem = ({ icon: Icon, label, active, onClick }) => ( ); const DashboardView = ({ idfs, onSelectIdf, userRole }) => { const filteredIDFs = userRole === 'inventor' ? idfs.filter(i => i.inventor === 'Sarah Chen') : idfs; // Reviewer sees all return (
i.status === 'Pending Review').length} icon={Clock} color="amber" /> {userRole === 'reviewer' ? ( ) : ( i.status === 'Approved').length} icon={CheckCircle} color="emerald" /> )}

Recent Disclosures

{userRole === 'reviewer' && } {filteredIDFs.map((idf) => ( onSelectIdf(idf)}> {userRole === 'reviewer' && ( )} ))}
Docket ID Title Date StatusScoreAction
{idf.id} {idf.title} {idf.dateCreated} {idf.score ? idf.score : '-'} {userRole === 'reviewer' ? 'Review' : 'View'}
); }; const StatCard = ({ title, value, icon: Icon, color }) => { const colorClasses = { blue: "bg-blue-100 text-blue-600", amber: "bg-amber-100 text-amber-600", emerald: "bg-emerald-100 text-emerald-600" }; return (

{title}

{value}

); }; // --- Wizard Component for New IDF --- const NewIDFWizard = ({ onCancel, onComplete }) => { const [step, setStep] = useState(1); const [loading, setLoading] = useState(false); const [formData, setFormData] = useState({ title: '', problem: '', solution: '', figures: [], docket: `IDF-2026-0${Math.floor(Math.random() * 89) + 10}` }); const handleNext = () => setStep(step + 1); const handleBack = () => setStep(step - 1); const AIPolish = ({ field, value }) => { const [isPolishing, setIsPolishing] = useState(false); const handlePolish = () => { setIsPolishing(true); setTimeout(() => { setFormData(prev => ({...prev, [field]: AI_SUGGESTIONS.polish})); setIsPolishing(false); }, 1500); }; return ( ); }; const steps = [ { number: 1, title: "Basic Information" }, { number: 2, title: "The Innovation" }, { number: 3, title: "Drawings & Evidence" }, { number: 4, title: "Review & Submit" } ]; return (
{/* Wizard Progress */}
{steps.map((s) => (
= s.number ? 'bg-blue-600 border-blue-600 text-white' : 'bg-white border-slate-300 text-slate-400' }`}> {step > s.number ? : s.number}
= s.number ? 'text-slate-800' : 'text-slate-400'}`}> {s.title}
))}
{/* Step 1: Basics */} {step === 1 && (

Let's start with the basics

The system has auto-generated a docket number for you.

setFormData({...formData, title: e.target.value})} />
)} {/* Step 2: Innovation (AI Heavily Used Here) */} {step === 2 && (

Describe the invention

You can speak, upload a file, or type. The AI will format it.

)} {/* Chat/Collaboration */}

Collaboration Log

AI
I asked the inventor to clarify the battery chemistry in section 2.
SC
Updated the spec with Lithium-Iron-Phosphate details.
); };