import{a as t}from"./rolldown-runtime-C_ttsnZz.js";import{St as r,_t as a,q as o,r as e}from"./index-BT8Vuu3B.js";var s=t(r(),1),i=o(),n=({sdk:t,schema:r,options:o,children:n})=>{const[d,l]=(0,s.useState)(!1),[c,m]=(0,s.useState)([]);if(e(()=>{d||(async()=>{try{a.addBreadCrumb("ValidateOptions","Validating state options",{options:o}),await r.validate(o,{abortEarly:!1}),l(!0)}catch(t){const r=t;m(r.errors),a.addBreadCrumb("ValidateOptions","State option validation failed",{errors:r.errors})}})()}),!d){if(c.length){const r=`Could not load ${t}`;return console.error(`${r}: ${c.join(", ")}`),(0,i.jsx)("p",{"data-testid":"error-message",children:r})}return(0,i.jsx)(i.Fragment,{})}return n};export{n as t};
//# sourceMappingURL=ValidateOptions-CSnRPA2E.js.map