import React, { useState } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { Search, ChevronLeft, ChevronRight, Sparkles } from 'lucide-react'; import { NAVIGATION_TOOLS, SITE_CONFIG } from '../config/tools'; const ToolSidebar = () => { const location = useLocation(); const [isCollapsed, setIsCollapsed] = useState(true); const [searchTerm, setSearchTerm] = useState(''); const filteredTools = NAVIGATION_TOOLS.filter(tool => tool.name.toLowerCase().includes(searchTerm.toLowerCase()) || tool.description.toLowerCase().includes(searchTerm.toLowerCase()) ); const isActive = (path) => location.pathname === path; return (
{/* Sidebar Header */}
{!isCollapsed && (

Tools

)}
{/* Search - only show when not collapsed */} {!isCollapsed && (
setSearchTerm(e.target.value)} className="w-full pl-9 pr-3 py-2.5 text-sm border border-slate-200 dark:border-slate-600 rounded-xl bg-white/80 dark:bg-slate-700/80 backdrop-blur-sm text-slate-900 dark:text-slate-100 placeholder-slate-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-300" />
)}
{/* Tools List */}
{/* Footer */} {!isCollapsed && (
Quick Access

{SITE_CONFIG.totalTools} tools available

)}
); }; export default ToolSidebar;