import { FolderPlus, Plus, RefreshCw, Search, X, PanelLeftClose } from 'lucide-react'; import type { TFunction } from 'i18next'; import { Button } from '../../../ui/button'; import { Input } from '../../../ui/input'; import { IS_PLATFORM } from '../../../../constants/config'; type SidebarHeaderProps = { isPWA: boolean; isMobile: boolean; isLoading: boolean; projectsCount: number; searchFilter: string; onSearchFilterChange: (value: string) => void; onClearSearchFilter: () => void; onRefresh: () => void; isRefreshing: boolean; onCreateProject: () => void; onCollapseSidebar: () => void; t: TFunction; }; export default function SidebarHeader({ isPWA, isMobile, isLoading, projectsCount, searchFilter, onSearchFilterChange, onClearSearchFilter, onRefresh, isRefreshing, onCreateProject, onCollapseSidebar, t, }: SidebarHeaderProps) { const LogoBlock = () => (

{t('app.title')}

); return (
{/* Desktop header */}
{IS_PLATFORM ? ( ) : ( )}
{/* Search bar */} {projectsCount > 0 && !isLoading && (
onSearchFilterChange(event.target.value)} className="nav-search-input pl-9 pr-8 h-9 text-sm rounded-xl border-0 placeholder:text-muted-foreground/40 focus-visible:ring-0 focus-visible:ring-offset-0 transition-all duration-200" /> {searchFilter && ( )}
)}
{/* Desktop divider */}
{/* Mobile header */}
{IS_PLATFORM ? ( ) : ( )}
{/* Mobile search */} {projectsCount > 0 && !isLoading && (
onSearchFilterChange(event.target.value)} className="nav-search-input pl-10 pr-9 h-10 text-sm rounded-xl border-0 placeholder:text-muted-foreground/40 focus-visible:ring-0 focus-visible:ring-offset-0 transition-all duration-200" /> {searchFilter && ( )}
)}
{/* Mobile divider */}
); }