"use client" import * as React from "react" import { Command as CommandPrimitive } from "cmdk" import { SearchIcon } from "lucide-react" import { cn } from "@/lib/utils" function Command({ className, ...props }: React.ComponentProps) { return ( ) } function CommandInput({ className, ...props }: React.ComponentProps) { return (
) } const CommandList = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => { return ( ) }) CommandList.displayName = CommandPrimitive.List.displayName ?? "CommandList" function CommandEmpty({ ...props }: React.ComponentProps) { return ( ) } function CommandGroup({ className, ...props }: React.ComponentProps) { return ( ) } function CommandSeparator({ className, ...props }: React.ComponentProps) { return ( ) } function CommandItem({ className, ...props }: React.ComponentProps) { return ( { // Ensure hover updates selection for visual feedback const item = e.currentTarget item.setAttribute("data-selected", "true") // Deselect siblings const siblings = item.parentElement?.querySelectorAll("[cmdk-item]") siblings?.forEach((sibling) => { if (sibling !== item) { sibling.setAttribute("data-selected", "false") } }) }} {...props} /> ) } export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, }