import { reactive as e, watch as t } from "vue";
import { objects as n } from "@milaboratories/helpers";
function r(r, i, a) {
	let o = e({
		data: n.deepClone(i(r.value)),
		changed: !1
	});
	return t(() => o.data, (e) => {
		o.changed ? a(n.deepClone(e)) : o.changed = !0;
	}, { deep: !0 }), t(r, (e) => {
		Object.assign(o, {
			data: n.deepClone(i(e)),
			changed: !1
		});
	}, {
		deep: !0,
		immediate: !0
	}), o;
}
export { r as useFormState };

//# sourceMappingURL=useFormState.js.map