"use client"; import { AtSign, CheckSquare, Mic, Paperclip, Play, Shield, } from "lucide-react"; import { motion, useReducedMotion } from "motion/react"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Textarea } from "@/components/ui/textarea"; import { agentEase, agentPanelTransition } from "./agent-motion"; import { cn } from "@/lib/utils"; import { type } from "@/lib/typography"; interface ChatComposerProps { value: string; onChange: (value: string) => void; onSubmit: () => void; disabled?: boolean; isSending?: boolean; className?: string; } export function ChatComposer({ value, onChange, onSubmit, disabled = false, isSending = false, className, }: ChatComposerProps) { const canSubmit = value.trim().length > 0 && !disabled && !isSending; const reduceMotion = useReducedMotion(); function handleKeyDown(event: React.KeyboardEvent) { if (event.key === "Enter" && !event.shiftKey) { event.preventDefault(); if (canSubmit) onSubmit(); } } return (