import{u as l,j as t,E as o,a as p,L as x,P as s,r as n}from"./index-BTeXlNCi.js";import{F as u,E as c}from"./EzFormMui-Dl2q2DE_.js";function d({name:r}){const e=l();return t.jsx(o,{justifyContent:"space-between",p:2,sx:{position:"relative",minWidth:{xs:null,sm:"36rem"},marginTop:"3vh",overflow:"hidden",width:"100%"},children:t.jsx(p,{text:r,variant:"h2",sx:{fontWeight:700,textAlign:"center",fontSize:"clamp(1.1rem, 2vw + .5rem, 2rem) !important",...x({gradient1:e.palette.jg.h1Gradient1,gradient2:e.palette.jg.h1Gradient2,deg:"0deg"})}})})}d.propTypes={name:s.string.isRequired};const f={formData:{notes:"",roundTrip:!1},serviceName:"",isFormReady:!1};function h({fields:r,name:e}){const a=u({additionalState:f}),[i,m]=n.useState(null);return n.useEffect(()=>{e&&(a.updateFieldsDataAndServiceName(r,e),m(r))},[e]),t.jsxs(o,{centered:!0,p:2,children:[t.jsx(d,{name:e}),i&&t.jsx(c,{fields:i,state:a,areFieldsPair:i?.length%2!==0,formContainerSx:{flexDirection:{xs:"column",md:"row"},flexWrap:"wrap","& > *":{flex:{xs:"1",md:"1 1 48%"},maxWidth:{xs:"100%",md:"50%"}}}})]})}h.propTypes={name:s.string.isRequired,fields:s.array.isRequired};export{h as B};