"use client"; import { MessageSquarePlus, Trash2, Settings, Sun, Search, HelpCircle, PanelLeftClose, ChevronRight, Zap, type LucideIcon, } from "lucide-react"; import { cn } from "@/lib/utils"; import { ShortcutBadge } from "@/components/shortcuts/ShortcutBadge"; import type { Command } from "@/lib/shortcuts"; const ICON_MAP: Record = { MessageSquarePlus, Trash2, Settings, Sun, Search, HelpCircle, PanelLeftClose, ChevronRight, Zap, }; interface CommandPaletteItemProps { command: Command; isActive: boolean; onSelect: () => void; onHighlight: () => void; } export function CommandPaletteItem({ command, isActive, onSelect, onHighlight, }: CommandPaletteItemProps) { const Icon = command.icon ? (ICON_MAP[command.icon] ?? ChevronRight) : ChevronRight; return (

{command.label}

{command.description && (

{command.description}

)}
{command.category} {command.keys.length > 0 && }
); }