import { PromptInput as e, PromptInputBody as t, PromptInputFooter as n, PromptInputSubmit as r, PromptInputTextarea as i } from "../../ai-elements/prompt-input.js";
import { useState as a } from "react";
import { jsx as o, jsxs as s } from "react/jsx-runtime";
import { Pill as c } from "lucide-react";
//#region src/components/ui-widgets/widgets/AiPromptInput.tsx
function l({ onSubmit: l, disabled: u, ui: d }) {
	let [f, p] = a(""), m = d?.label ?? "Submit";
	return /* @__PURE__ */ s(e, {
		onSubmit: (e, t) => {
			t.preventDefault(), e.text && (l(e.text), p(""));
		},
		children: [/* @__PURE__ */ o(t, { children: /* @__PURE__ */ o(i, {
			value: f,
			onChange: (e) => p(e.target.value),
			placeholder: "Type your message...",
			disabled: u || !1,
			rows: 1,
			className: "flex-1"
		}) }), /* @__PURE__ */ s(n, { children: [/* @__PURE__ */ s("div", {
			className: "mr-4 flex items-center",
			children: [/* @__PURE__ */ o(c, {
				size: "16",
				className: "mr-2"
			}), m]
		}), /* @__PURE__ */ o(r, { disabled: u || !1 })] })]
	});
}
//#endregion
export { l as default };
