import { Button } from "../../ui/button.js";
import { c } from "react/compiler-runtime";
import React from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { Loader2 } from "lucide-react";
const SubmitButton = (a) => {
	let o = c(10), { transition: s, ui: l, disabled: u, onClick: d, isLoading: f } = a, p = l?.label || s, m;
	o[0] === l?.props ? m = o[1] : (m = l?.props || {}, o[0] = l?.props, o[1] = m);
	let h = m, g = u || f, _;
	o[2] === f ? _ = o[3] : (_ = f && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), o[2] = f, o[3] = _);
	let v;
	return o[4] !== d || o[5] !== h || o[6] !== p || o[7] !== g || o[8] !== _ ? (v = /* @__PURE__ */ jsxs(Button, {
		type: "button",
		variant: "default",
		...h,
		disabled: g,
		onClick: d,
		size: "default",
		className: "w-48",
		children: [_, p]
	}), o[4] = d, o[5] = h, o[6] = p, o[7] = g, o[8] = _, o[9] = v) : v = o[9], v;
};
export { SubmitButton };
