'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from 'react';
import { Send } from 'lucide-react';
import { Button } from '../../ui/button.js';
import { Input } from '../../ui/input.js';
export function DrawerRevisionInput({ onSubmit, placeholder = 'Ask AI to revise...', ariaLabel, disabled = false, }) {
    const [chatInput, setChatInput] = useState('');
    function handleSubmit(e) {
        e.preventDefault();
        const text = chatInput.trim();
        if (!text)
            return;
        onSubmit(text);
        setChatInput('');
    }
    return (_jsxs("form", { onSubmit: handleSubmit, className: "flex items-center gap-2 p-4", children: [_jsx(Input, { type: "text", placeholder: placeholder, "aria-label": ariaLabel ?? placeholder, disabled: disabled, value: chatInput, onChange: (e) => setChatInput(e.target.value), className: "flex-1" }), _jsx(Button, { type: "submit", variant: "secondary", size: "icon", "aria-label": "Send", disabled: disabled, children: _jsx(Send, {}) })] }));
}
