'use client' import * as React from 'react' import { Command } from 'cmdk' import { Search, MessageSquare, Loader2 } from 'lucide-react' import { cn } from '@open-mercato/shared/lib/utils' import type { CommandPaletteMode } from '../../types' interface CommandInputProps { value: string onValueChange: (value: string) => void mode: CommandPaletteMode isLoading?: boolean placeholder?: string } export function CommandInput({ value, onValueChange, mode, isLoading, placeholder }: CommandInputProps) { const defaultPlaceholder = mode === 'chat' ? 'Ask AI...' : 'Search commands or ask AI...' return (
{isLoading ? ( ) : mode === 'chat' ? ( ) : ( )}
{mode === 'chat' && ( AI )}
) }