{"version":3,"file":"ECG_CHECKOUT.DP4GaGPU.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/rMBDWaEku8FP4ImxeUH1/2dY8JrPvSHL78CS2tJP9/ECG_CHECKOUT.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function CheckoutComponent(props){const{logo,contractLink,parceladoLink,avistaLink,backgroundImage,backgroundColor,textColor,fontFamily,buttonBg,buttonTextColor,buttonRadius,buttonPadding,buttonTextSize,buttonFontWeight,language}=props;const[isAceito,setIsAceito]=useState(false);const[pgmethod,setPgmethod]=useState(\"parcelado\");const[queryString,setQueryString]=useState(\"\");const[showError,setShowError]=useState(false);useEffect(()=>{if(typeof window!==\"undefined\"){setQueryString(window.location.search.slice(1));}},[]);const buildLink=baseUrl=>{if(!queryString)return baseUrl;return`${baseUrl}&${queryString}`;};const finalLink=pgmethod===\"avista\"?buildLink(avistaLink):buildLink(parceladoLink);const content={pt:{heading:\"Finalize sua inscri\\xe7\\xe3o\",termsText:\"Para prosseguir com a inscri\\xe7\\xe3o no Intensivo de ECG, \\xe9 necess\\xe1rio que voc\\xea aceite os termos do contrato. Voc\\xea pode acessar os termos atrav\\xe9s do bot\\xe3o abaixo e, quando estiver pronto, marque o aceite e prossiga com sua inscri\\xe7\\xe3o\",contractButtonText:\"Acessar o Contrato\",paymentLabel:\"Selecione a forma de pagamento\",optionVista:/*#__PURE__*/_jsxs(_Fragment,{children:[\"\\xc0 vista - \",/*#__PURE__*/_jsx(\"b\",{children:\"10% de desconto\"})]}),optionParcelado:\"Parcelado\",checkboxLabel:\"Eu li e estou de acordo com os termos do Intensivo de ECG.\",errorMessage:\"Voc\\xea precisa aceitar os termos antes de continuar.\",buttonText:\"Prosseguir com a Inscri\\xe7\\xe3o\"},en:{termsText:\"To proceed with your registration for the ECG Academy, you need to accept the terms of the agreement. You can access the terms using the button below and, when you're ready, check the box to accept and continue with your registration.\",contractButtonText:\"Review terms\",paymentLabel:\"How would you like to pay?\",optionVista:/*#__PURE__*/_jsxs(_Fragment,{children:[\"One payment – \",/*#__PURE__*/_jsx(\"b\",{children:\"get extra 10% off\"})]}),optionParcelado:\"Installments – Up to 12 installments\",checkboxLabel:\" I have read and agree to theTerms of the Agreement of the ECG Academy.\",errorMessage:\"You have to read and agree with our terms of service before continuing.\",buttonText:\"Enroll now\"}}[language];const handleSubmit=e=>{if(!isAceito){e.preventDefault();setShowError(true);}};return /*#__PURE__*/_jsxs(\"div\",{style:{fontFamily,color:textColor,backgroundColor,backgroundImage:backgroundImage?`url(${backgroundImage})`:\"none\",backgroundSize:\"cover\",backgroundPosition:\"center\",padding:\"40px\",borderRadius:\"12px\"},children:[logo&&/*#__PURE__*/_jsx(\"img\",{src:logo,alt:\"Logo\",style:{maxWidth:180,marginBottom:24,display:\"block\"}}),/*#__PURE__*/_jsx(\"h1\",{style:{marginBottom:\"16px\"},children:content.heading}),/*#__PURE__*/_jsx(\"p\",{style:{maxWidth:600},children:content.termsText}),/*#__PURE__*/_jsxs(\"a\",{href:contractLink,target:\"_blank\",rel:\"noopener noreferrer\",style:{display:\"inline-flex\",alignItems:\"center\",gap:\"8px\",backgroundColor:\"#fff\",color:\"#000\",border:\"1px dashed #ccc\",padding:\"10px 16px\",borderRadius:\"8px\",textDecoration:\"none\",fontWeight:500,marginTop:12,marginBottom:24},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#e53935\",fontSize:\"18px\"},children:\"📄\"}),content.contractButtonText]}),/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:24},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:500},children:content.paymentLabel}),/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:12},children:[/*#__PURE__*/_jsxs(\"label\",{style:{display:\"block\",marginBottom:8},children:[/*#__PURE__*/_jsx(\"input\",{type:\"radio\",value:\"avista\",checked:pgmethod===\"avista\",onChange:()=>setPgmethod(\"avista\")}),\" \",content.optionVista]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"block\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"radio\",value:\"parcelado\",checked:pgmethod===\"parcelado\",onChange:()=>setPgmethod(\"parcelado\")}),\" \",content.optionParcelado]})]})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"block\",marginBottom:8,color:showError?\"#f00\":textColor},children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",checked:isAceito,onChange:()=>{setIsAceito(!isAceito);setShowError(false);}}),\" \",content.checkboxLabel]}),showError&&/*#__PURE__*/_jsx(\"p\",{style:{color:\"#f00\",marginTop:4},children:content.errorMessage}),/*#__PURE__*/_jsx(\"a\",{href:isAceito?finalLink:\"#\",onClick:handleSubmit,style:{display:\"inline-block\",marginTop:24,padding:buttonPadding,backgroundColor:buttonBg,color:buttonTextColor,fontWeight:buttonFontWeight,fontSize:buttonTextSize,borderRadius:buttonRadius,textDecoration:\"none\"},rel:\"nofollow\",children:content.buttonText})]});}// —————————————————————————————————\n// Framer Property Controls\n// —————————————————————————————————\naddPropertyControls(CheckoutComponent,{language:{title:\"Language\",type:ControlType.Enum,options:[\"pt\",\"en\"],optionTitles:[\"Portugu\\xeas\",\"English\"],defaultValue:\"pt\"},logo:{title:\"Logo\",type:ControlType.Image},contractLink:{title:\"Contract PDF Link\",type:ControlType.String,defaultValue:\"https://metaanalysis.academy/pdf/Contrato_VIII_Meta_Academy.pdf\"},avistaLink:{title:\"One-Time Payment Link\",type:ControlType.String,defaultValue:\"https://pay.hotmart.com/A101378602V?off=daxi269h&checkoutMode=10\"},parceladoLink:{title:\"Installment Link\",type:ControlType.String,defaultValue:\"https://pay.hotmart.com/A101378602V?off=79irpx15&checkoutMode=10\"},backgroundImage:{title:\"Background Image\",type:ControlType.Image},backgroundColor:{title:\"Background Color\",type:ControlType.Color,defaultValue:\"#090717\"},textColor:{title:\"Text Color\",type:ControlType.Color,defaultValue:\"#ffffff\"},fontFamily:{title:\"Font\",type:ControlType.Enum,options:[\"Inter\",\"Roboto\",\"Lato\",\"Montserrat\",\"Poppins\",\"Open Sans\"],optionTitles:[\"Inter\",\"Roboto\",\"Lato\",\"Montserrat\",\"Poppins\",\"Open Sans\"],defaultValue:\"Inter\"},buttonBg:{title:\"Button Background\",type:ControlType.Color,defaultValue:\"#00f087\"},buttonTextColor:{title:\"Button Text Color\",type:ControlType.Color,defaultValue:\"#000000\"},buttonRadius:{title:\"Button Radius\",type:ControlType.Number,defaultValue:6,min:0,max:100,unit:\"px\"},buttonPadding:{title:\"Button Padding\",type:ControlType.String,defaultValue:\"12px 24px\"},buttonTextSize:{title:\"Button Font Size\",type:ControlType.Number,defaultValue:16,min:10,max:32,unit:\"px\"},buttonFontWeight:{title:\"Button Font Weight\",type:ControlType.Enum,options:[\"400\",\"500\",\"600\",\"700\",\"800\"],optionTitles:[\"Normal\",\"Medium\",\"Semibold\",\"Bold\",\"Extra Bold\"],defaultValue:\"600\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CheckoutComponent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ECG_CHECKOUT.map"],"mappings":"6MAAyK,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,OAAK,eAAa,gBAAc,aAAW,kBAAgB,kBAAgB,YAAU,aAAW,WAAS,kBAAgB,eAAa,gBAAc,iBAAe,mBAAiB,YAAU,EAAW,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,YAAY,CAAM,CAAC,EAAY,GAAgBA,EAAS,GAAG,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAC,MAAc,CAAW,IAAS,QAAa,EAAe,EAAO,SAAS,OAAO,MAAM,EAAE,CAAC,EAAI,EAAE,CAAC,CAAC,IAAmG,GAA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