import { useState } from 'react'; import { motion } from 'framer-motion'; import { Search, Download, Filter, BookOpen, FileText, ScrollText, BookMarked, ChevronRight } from 'lucide-react'; import SectionTitle from '@/components/SectionTitle/SectionTitle'; import { StaggerContainer, StaggerItem } from '@/components/AnimatedContainer/AnimatedContainer'; import { TOOLKIT_ITEMS, DEPARTMENTS } from '@/constants'; const SEMESTERS = ['All', '1st Sem', '2nd Sem', '3rd Sem', '4th Sem', '5th Sem', '6th Sem', '7th Sem', '8th Sem']; const TYPE_COLORS: Record }> = { notes: { bg: '#EFF6FF', text: '#3B82F6', icon: BookOpen }, pyq: { bg: '#FFF7ED', text: '#F97316', icon: FileText }, syllabus: { bg: '#ECFDF5', text: '#10B981', icon: ScrollText }, assignment: { bg: '#FDF2F8', text: '#EC4899', icon: BookMarked }, }; const NOTES_DATA = [ { id: '1', title: 'Engineering Mathematics – Unit 1-5', subject: 'Mathematics', department: 'Computer Science & Engineering', semester: 1, type: 'notes', downloads: 348, fileSize: '4.2 MB', uploadedAt: '2025-06-01' }, { id: '2', title: 'Physics PYQ 2020-2024', subject: 'Physics', department: 'Computer Science & Engineering', semester: 1, type: 'pyq', downloads: 512, fileSize: '8.1 MB', uploadedAt: '2025-06-10' }, { id: '3', title: 'C Programming Complete Notes', subject: 'Programming', department: 'Computer Science & Engineering', semester: 1, type: 'notes', downloads: 734, fileSize: '6.3 MB', uploadedAt: '2025-06-15' }, { id: '4', title: 'Data Structures PYQ 2019-2024', subject: 'Data Structures', department: 'Computer Science & Engineering', semester: 3, type: 'pyq', downloads: 621, fileSize: '10.2 MB', uploadedAt: '2025-07-01' }, { id: '5', title: 'Circuit Theory Full Notes', subject: 'Circuit Theory', department: 'Electronics & Communication', semester: 2, type: 'notes', downloads: 289, fileSize: '5.7 MB', uploadedAt: '2025-06-20' }, { id: '6', title: 'Anna University Syllabus 2021', subject: 'Syllabus', department: 'All Departments', semester: 1, type: 'syllabus', downloads: 890, fileSize: '2.1 MB', uploadedAt: '2025-05-01' }, { id: '7', title: 'Thermodynamics Notes', subject: 'Thermodynamics', department: 'Mechanical Engineering', semester: 3, type: 'notes', downloads: 201, fileSize: '3.9 MB', uploadedAt: '2025-06-25' }, { id: '8', title: 'Digital Electronics PYQ', subject: 'Digital Electronics', department: 'Electronics & Communication', semester: 4, type: 'pyq', downloads: 445, fileSize: '7.3 MB', uploadedAt: '2025-07-05' }, ]; export default function Notes() { const [searchQuery, setSearchQuery] = useState(''); const [selectedSem, setSelectedSem] = useState('All'); const [selectedDept, setSelectedDept] = useState('All Departments'); const [selectedType, setSelectedType] = useState('all'); const filtered = NOTES_DATA.filter((note) => { const matchSearch = note.title.toLowerCase().includes(searchQuery.toLowerCase()) || note.subject.toLowerCase().includes(searchQuery.toLowerCase()); const matchSem = selectedSem === 'All' || note.semester === parseInt(selectedSem); const matchDept = selectedDept === 'All Departments' || note.department === selectedDept || note.department === 'All Departments'; const matchType = selectedType === 'all' || note.type === selectedType; return matchSearch && matchSem && matchDept && matchType; }); return (
{/* Header */}
Home Notes & PYQs

Notes &{' '} PYQs

Access semester-wise notes, previous year question papers, and study materials.

{/* Search + Filters */} {/* Search */}
setSearchQuery(e.target.value)} className="w-full pl-11 pr-4 py-3 rounded-xl border border-[#E5E7EB] text-sm text-[#1E293B] placeholder-[#94A3B8] focus:outline-none focus:border-[#F97316] transition-colors" style={{ fontFamily: 'Inter, sans-serif' }} />
{/* Type Filter */}
{['all', 'notes', 'pyq', 'syllabus'].map((type) => ( ))}
{/* Semester Filter */}
{SEMESTERS.slice(0, 5).map((sem) => ( ))}
{/* Results */} {filtered.map((note) => { const typeConfig = TYPE_COLORS[note.type]; const TypeIcon = typeConfig.icon; return (
{note.type}

{note.title}

{note.subject} · Sem {note.semester}

{note.downloads} downloads · {note.fileSize}
Download
); })}
{/* Toolkit Section */} {TOOLKIT_ITEMS.map((item) => (
{item.title}
{item.description}
))}
); }