import{a8 as i,r as s,j as o,c as l}from"./main-TIUJvpaR.js";function d({children:n,name:a,separatorBottom:m=!0,separatorTop:c=!0}){const{formState:{errors:u}}=i(),e=s.useRef(null),r=u[a];return s.useEffect(()=>{var t;r&&((t=e.current)==null||t.scrollIntoView({behavior:"smooth"}))},[r]),o.jsxs("div",{className:l(m&&"border-b mb-20 pb-20",c&&"border-t mt-20 pt-20",r&&"border-y-error"),ref:e,children:[n(!!r),r&&o.jsx("div",{className:"text-danger text-sm mt-20",dangerouslySetInnerHTML:{__html:r.message}})]})}export{d as S};
