import AiPromptInput_default from "./widgets/AiPromptInput.js";
import { ButtonFullWidth } from "./widgets/ButtonFullWidth.js";
import { SubmitButton } from "./widgets/SubmitButton.js";
import { c } from "react/compiler-runtime";
import React from "react";
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
var UiWidget_default = (o) => {
	let s = c(18), { config: l, onSubmit: u, disabled: d, isLoading: f } = o;
	switch (l.widget) {
		case "prompt-input": {
			let i;
			return s[0] !== l.options || s[1] !== l.transition || s[2] !== d || s[3] !== u ? (i = /* @__PURE__ */ jsx(AiPromptInput_default, {
				transition: l.transition,
				disabled: d,
				onSubmit: u,
				ui: l.options
			}), s[0] = l.options, s[1] = l.transition, s[2] = d, s[3] = u, s[4] = i) : i = s[4], i;
		}
		case "button": {
			let e = l.options, i;
			return s[5] !== l.transition || s[6] !== d || s[7] !== f || s[8] !== u || s[9] !== e ? (i = /* @__PURE__ */ jsx(SubmitButton, {
				transition: l.transition,
				ui: e,
				disabled: d,
				onClick: u,
				isLoading: f
			}), s[5] = l.transition, s[6] = d, s[7] = f, s[8] = u, s[9] = e, s[10] = i) : i = s[10], i;
		}
		case "button-full-w": {
			let e = l.options, a;
			return s[11] !== l.transition || s[12] !== d || s[13] !== f || s[14] !== u || s[15] !== e ? (a = /* @__PURE__ */ jsx(ButtonFullWidth, {
				transition: l.transition,
				ui: e,
				disabled: d,
				onClick: u,
				isLoading: f
			}), s[11] = l.transition, s[12] = d, s[13] = f, s[14] = u, s[15] = e, s[16] = a) : a = s[16], a;
		}
	}
	let p;
	return s[17] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ jsx(Fragment$1, {}), s[17] = p) : p = s[17], p;
};
export { UiWidget_default as default };
