import * as DropdownMenu from '@radix-ui/react-dropdown-menu' import { ChevronDown, ChevronUp, FileText, Lightbulb, Globe } from 'lucide-react' import { useState } from 'react' import { t } from '../../../lang/helpers' interface SearchModeSelectProps { searchMode: 'notes' | 'insights' | 'all' onSearchModeChange: (mode: 'notes' | 'insights' | 'all') => void } export function SearchModeSelect({ searchMode, onSearchModeChange }: SearchModeSelectProps) { const [isOpen, setIsOpen] = useState(false) const searchModes = [ { value: 'all' as const, name: t('semanticSearch.searchMode.all'), icon: , description: t('semanticSearch.searchMode.allDescription') }, { value: 'notes' as const, name: t('semanticSearch.searchMode.notes'), icon: , description: t('semanticSearch.searchMode.notesDescription') }, { value: 'insights' as const, name: t('semanticSearch.searchMode.insights'), icon: , description: t('semanticSearch.searchMode.insightsDescription') } ] const currentMode = searchModes.find((m) => m.value === searchMode) return ( <> {currentMode?.icon} {currentMode?.name} {isOpen ? : } {searchModes.map((mode) => ( { onSearchModeChange(mode.value) }} asChild > {mode.icon} {mode.name} {mode.description} ))} > ) }