import{j as i,h as f}from"./codemirror-core-vkcnXJgD.js";import{b9 as v,t as b,i as $,ba as h}from"./react-dom-CwaHFgt6.js";import{t as j}from"./index-BCSjj6Us.js";var w=j({base:"flex flex-col gap-2 items-start"}),A=t=>i.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...t,children:i.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),d=Symbol("default");function C(t,l){let e=f.useContext(t);if(l===null)return null;if(e&&typeof e=="object"&&"slots"in e&&e.slots){let a=new Intl.ListFormat().format(Object.keys(e.slots).map(s=>`"${s}"`));if(!l&&!e.slots[d])throw new Error(`A slot prop is required. Valid slot names are ${a}.`);let o=l||d;if(!e.slots[o])throw new Error(`Invalid slot "${l}". Valid slot names are ${a}.`);return e.slots[o]}return e}function F(t,l,e){let a=C(e,t.slot)||{},{ref:o,...s}=a,c=v(f.useMemo(()=>b(l,o),[l,o])),r=$(s,t);return"style"in s&&s.style&&"style"in t&&t.style&&(typeof s.style=="function"||typeof t.style=="function"?r.style=n=>{let y=typeof s.style=="function"?s.style(n):s.style,u={...n.defaultStyle,...y},x=typeof t.style=="function"?t.style({...n,defaultStyle:u}):t.style;return{...u,...x}}:r.style={...s.style,...t.style}),[r,c]}var m=f.createContext(null),P=f.forwardRef(function(l,e){[l,e]=F(l,e,m);let{validationErrors:a,validationBehavior:o="native",children:s,className:c,...r}=l;const n=f.useMemo(()=>w({className:c}),[c]);return i.jsx("form",{noValidate:o!=="native",...r,ref:e,className:n,children:i.jsx(m.Provider,{value:{...l,validationBehavior:o},children:i.jsx(h.Provider,{value:a??{},children:s})})})});export{A as C,P as F,m as a,w as f,C as u};
