import React, { useState, FormEvent } from 'react'; // FIX: Import Sparkles icon for AI feature button import { Search, RefreshCw, X, FolderPlus, Sparkles } from 'lucide-react'; interface HeaderBarProps { onSearch: (term: string) => void; onRefresh: () => void; onCreateFolder: () => void; // FIX: Add prop for new AI feature onAnalyzeImage: () => void; isLoading: boolean; } const HeaderBar: React.FC = ({ onSearch, onRefresh, onCreateFolder, onAnalyzeImage, isLoading }) => { const [inputValue, setInputValue] = useState(''); const handleSearch = (e: FormEvent) => { e.preventDefault(); onSearch(inputValue); }; const handleClear = () => { setInputValue(''); onSearch(''); }; return (
setInputValue(e.target.value)} className="w-full pl-10 pr-10 py-2 border border-slate-300 dark:border-slate-600 rounded-md bg-slate-50 dark:bg-slate-700 text-slate-800 dark:text-slate-200 focus:ring-2 focus:ring-primary focus:border-primary outline-none transition" /> {inputValue && ( )}
{/* FIX: Add new button for AI Vision feature */}
); }; export default HeaderBar;