import React from 'react'; import { motion } from 'framer-motion'; import { classNames } from '~/utils/classNames'; import { Badge } from './Badge'; interface SearchResultItemProps { title: string; subtitle?: string; description?: string; icon?: string; iconBackground?: string; iconColor?: string; tags?: string[]; metadata?: Array<{ icon?: string; label: string; value?: string | number; }>; actionLabel?: string; onAction?: () => void; onClick?: () => void; className?: string; } export function SearchResultItem({ title, subtitle, description, icon, iconBackground = 'bg-bolt-elements-background-depth-1/80 dark:bg-bolt-elements-background-depth-4/80', iconColor = 'text-purple-500', tags, metadata, actionLabel, onAction, onClick, className, }: SearchResultItemProps) { return (
{icon && (
)}

{title}

{subtitle && (

{subtitle}

)}
{actionLabel && onAction && ( { e.stopPropagation(); onAction(); }} className="px-4 py-2 h-9 rounded-lg bg-purple-500 text-white hover:bg-purple-600 transition-all duration-200 flex items-center gap-2 min-w-[100px] justify-center text-sm shadow-sm hover:shadow-md" whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} > {actionLabel} )}
{description && (

{description}

)} {tags && tags.length > 0 && (
{tags.map((tag) => ( {tag} ))}
)} {metadata && metadata.length > 0 && (
{metadata.map((item, index) => (
{item.icon && } {item.label} {item.value !== undefined && ': '} {item.value !== undefined && ( {item.value} )}
))}
)}
); }