'use client'; import { ScrollArea } from "@/components/ui/scroll-area"; import { Scrollbar } from "@radix-ui/react-scroll-area"; import { FileMatchContainer } from "./fileMatchContainer"; import { SearchResultFile } from "@/lib/types"; interface SearchResultsPanelProps { fileMatches: SearchResultFile[]; onOpenFileMatch: (fileMatch: SearchResultFile) => void; onMatchIndexChanged: (matchIndex: number) => void; } export const SearchResultsPanel = ({ fileMatches, onOpenFileMatch, onMatchIndexChanged, }: SearchResultsPanelProps) => { if (fileMatches.length === 0) { return (

No results found

); } return ( {fileMatches.map((fileMatch, index) => ( { onOpenFileMatch(fileMatch); }} onMatchIndexChanged={(matchIndex) => { onMatchIndexChanged(matchIndex); }} /> ))} ) }