const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/schema-form-savMxoOe.js","assets/vendor-tanstack-BVzzyDEt.js","assets/vendor-react-Bce9NwRC.js","assets/use-debounce-callback-K3TIomWn.js","assets/index-BJkJ93Lr.js","assets/vendor-radix-CTAic6HB.js","assets/vendor-recharts-Mwm2qLZp.js","assets/vendor-forms-BN3tpxM2.js","assets/vendor-date-2jFo9aCm.js","assets/index-t3SW0WbL.css","assets/primitives-BxgEGUr4.js","assets/toggle-group-B18EYoB-.js","assets/textarea-BWNxlLo9.js"])))=>i.map(i=>d[i]);
import{dN as n,b3 as u,cb as l}from"./index-BJkJ93Lr.js";import{u as d,a as h}from"./primitives-BxgEGUr4.js";import{j as s,r as o}from"./vendor-tanstack-BVzzyDEt.js";async function S(r,e){const{data:a}=await(await n()).POST("/ui/schemas/validate",{body:{schema:r,values:e}});if(!a)throw new Error('"data" expected');return a}const y=()=>{const[r,e]=d(),[a,t]=h();return{setValues:e,values:r,errors:a,validateForm:async({schema:c})=>{try{const{errors:m,valid:i}=await S(c,r);t(i?[]:m)}catch{throw new Error("Server error occurred validating schema")}}}},v=o.lazy(()=>l(()=>import("./schema-form-savMxoOe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(r=>({default:r.SchemaForm})));function E(r){return s.jsx(o.Suspense,{fallback:s.jsx(u,{className:"min-h-[300px] w-full"}),children:s.jsx(v,{...r})})}export{E as L,y as u};
//# sourceMappingURL=lazy-schema-form-Clp5QfAW.js.map
