import type { HTMLAttributes, InputHTMLAttributes } from "react"; import { cn } from "@/lib/utils"; export interface CommandProps extends HTMLAttributes { shouldFilter?: boolean; } export function Command({ className, shouldFilter, ...props }: CommandProps) { return ; } export interface CommandInputProps extends Omit, "onValueChange"> { onValueChange?: (value: string) => void; } export function CommandInput({ className, onValueChange, onChange, ...props }: CommandInputProps) { return ( { onValueChange?.(e.target.value); onChange?.(e); }} {...props} /> ); } export function CommandList({ className, ...props }: HTMLAttributes) { return ; } export function CommandEmpty({ className, ...props }: HTMLAttributes) { return ; } export interface CommandGroupProps extends HTMLAttributes { heading?: string; } export function CommandGroup({ className, heading, ...props }: CommandGroupProps) { return ; } export interface CommandItemProps extends Omit, "onSelect"> { value?: string; disabled?: boolean; onSelect?: (value: string) => void; } export function CommandItem({ className, value, disabled, onSelect, ...props }: CommandItemProps) { return ( !disabled && onSelect?.(value ?? "")} className={cn(className)} {...props} /> ); } export function CommandSeparator({ className, ...props }: HTMLAttributes) { return ; }