{"version":3,"file":"ImageShadow.DoTW5Qku.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/MPALFK2qKgFcvTO9LM46/ken4xe3ipr27ORIMieAu/ImageShadow.js"],"sourcesContent":["// Custom image component with colorful blurred shadow effect\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageShadow(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Image with shadow\"},shadow,borderRadius,formTitle,submitButtonText,hubspotPortalId,hubspotFormId,hubspotRegion,style}=props;const[isPopupOpen,setIsPopupOpen]=useState(false);const[isHubSpotLoaded,setIsHubSpotLoaded]=useState(false);// Load HubSpot script\nuseEffect(()=>{if(typeof window===\"undefined\")return;const script=document.createElement(\"script\");script.src=\"https://js.hsforms.net/forms/v2.js\";script.async=true;script.onload=()=>{startTransition(()=>setIsHubSpotLoaded(true));};document.body.appendChild(script);return()=>{if(document.body.contains(script)){document.body.removeChild(script);}};},[]);// Create HubSpot form when popup opens\nuseEffect(()=>{if(typeof window===\"undefined\")return;if(!isPopupOpen||!isHubSpotLoaded)return;if(!hubspotPortalId||!hubspotFormId)return;// Clear previous form\nconst container=document.getElementById(\"hubspot-form-container\");if(container){container.innerHTML=\"\";}// @ts-ignore\nif(window.hbspt){// @ts-ignore\nwindow.hbspt.forms.create({region:hubspotRegion||\"na1\",portalId:hubspotPortalId,formId:hubspotFormId,target:\"#hubspot-form-container\"});}},[isPopupOpen,isHubSpotLoaded,hubspotPortalId,hubspotFormId,hubspotRegion]);const handleImageClick=()=>{startTransition(()=>setIsPopupOpen(true));};const handleClosePopup=()=>{startTransition(()=>setIsPopupOpen(false));};const handleSubmit=e=>{e.preventDefault();// Handle form submission here\nconsole.log(\"Form submitted\");handleClosePopup();};const containerStyle={position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"};const shadowStyle={position:\"absolute\",width:\"100%\",height:\"100%\",backgroundImage:`url(${image.src})`,backgroundSize:\"cover\",backgroundPosition:\"center\",borderRadius:`${borderRadius}px`,filter:`blur(${shadow.blurAmount}px) brightness(${1-shadow.darkenAmount/100})`,opacity:shadow.opacity/100,transform:`translate(${shadow.offsetX}px, ${shadow.offsetY}px)`,zIndex:0};const imageStyle={position:\"relative\",width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius:`${borderRadius}px`,zIndex:1,cursor:\"pointer\"};const overlayStyle={position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",backgroundColor:\"rgba(0, 0, 0, 0.5)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:1e3};const popupStyle={backgroundColor:\"#FFFFFF\",borderRadius:\"16px\",padding:\"32px\",maxWidth:\"1100px\",width:\"90%\",maxHeight:\"80vh\",overflow:\"auto\",position:\"relative\",boxShadow:\"0 10px 40px rgba(0, 0, 0, 0.2)\"};const closeButtonStyle={position:\"absolute\",top:\"16px\",right:\"16px\",background:\"transparent\",border:\"none\",fontSize:\"24px\",cursor:\"pointer\",color:\"#666\",padding:\"4px 8px\"};const formTitleStyle={fontSize:\"24px\",fontWeight:\"bold\",marginBottom:\"24px\",color:\"#000000\"};const fieldStyle={marginBottom:\"16px\"};const labelStyle={display:\"block\",marginBottom:\"8px\",fontSize:\"14px\",fontWeight:\"500\",color:\"#333\"};const inputStyle={width:\"100%\",padding:\"12px\",fontSize:\"14px\",border:\"1px solid #EEEEEE\",borderRadius:\"8px\",boxSizing:\"border-box\"};const submitButtonStyle={width:\"100%\",padding:\"12px 24px\",fontSize:\"16px\",fontWeight:\"600\",color:\"#FFFFFF\",backgroundColor:\"#000000\",border:\"none\",borderRadius:\"8px\",cursor:\"pointer\",marginTop:\"8px\"};const loadingContainerStyle={display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",padding:\"40px 0\",gap:\"16px\"};const spinnerStyle={width:\"40px\",height:\"40px\",border:\"4px solid #F5F5F5\",borderTop:\"4px solid #000000\",borderRadius:\"50%\",animation:\"spin 1s linear infinite\"};const loadingTextStyle={fontSize:\"14px\",color:\"#666\"};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                @keyframes spin {\n                    0% { transform: rotate(0deg); }\n                    100% { transform: rotate(360deg); }\n                }\n            `}),/*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:shadowStyle,\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt||\"\",style:imageStyle,onClick:handleImageClick})]}),isPopupOpen&&/*#__PURE__*/_jsx(\"div\",{style:overlayStyle,onClick:handleClosePopup,children:/*#__PURE__*/_jsxs(\"div\",{style:popupStyle,onClick:e=>e.stopPropagation(),children:[/*#__PURE__*/_jsx(\"button\",{style:closeButtonStyle,onClick:handleClosePopup,\"aria-label\":\"Close popup\",children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"h2\",{style:formTitleStyle,children:formTitle}),/*#__PURE__*/_jsx(\"div\",{id:\"hubspot-form-container\"})]})})]});}addPropertyControls(ImageShadow,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},shadow:{type:ControlType.Object,title:\"Shadow\",controls:{opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:80,min:0,max:100,step:1,unit:\"%\"},darkenAmount:{type:ControlType.Number,title:\"Darken Amount\",defaultValue:10,min:0,max:100,step:1,unit:\"%\"},offsetX:{type:ControlType.Number,title:\"X\",defaultValue:0,min:-50,max:50,step:1,unit:\"px\"},offsetY:{type:ControlType.Number,title:\"Y\",defaultValue:20,min:-50,max:50,step:1,unit:\"px\"},blurAmount:{type:ControlType.Number,title:\"Blur\",defaultValue:30,min:0,max:50,step:1,unit:\"px\"}}},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:2e3,step:1,unit:\"px\"},formTitle:{type:ControlType.String,title:\"Form Title\",defaultValue:\"Contact Us\"},submitButtonText:{type:ControlType.String,title:\"Submit Button\",defaultValue:\"Submit\"},hubspotPortalId:{type:ControlType.String,title:\"HubSpot Portal ID\",defaultValue:\"\"},hubspotFormId:{type:ControlType.String,title:\"HubSpot Form ID\",defaultValue:\"\"},hubspotRegion:{type:ControlType.String,title:\"HubSpot Region\",defaultValue:\"na1\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageShadow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageShadow.map"],"mappings":"oNAIG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,mBAAmB,EAAE,SAAO,eAAa,YAAU,mBAAiB,kBAAgB,gBAAc,gBAAc,SAAO,EAAW,CAAC,EAAY,GAAgBA,EAAS,EAAK,EAAO,CAAC,EAAgB,GAAoBA,EAAS,EAAK,EAChX,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAyK,MAAvK,GAAO,IAAI,qCAAqC,EAAO,MAAM,GAAK,EAAO,WAAW,CAAC,MAAoB,EAAmB,EAAI,CAAC,CAAE,EAAE,SAAS,KAAK,YAAY,CAAM,MAAY,CAAI,SAAS,KAAK,SAAS,CAAM,GAAG,SAAS,KAAK,YAAY,CAAM,CAAG,CAAE,EAAE,CAAC,CAAC,EACjW,MAAc,CAAgF,GAArE,IAAS,QAAsB,CAAC,GAAa,CAAC,GAA0B,CAAC,GAAiB,CAAC,EAAc,OAClI,IAAM,EAAU,SAAS,eAAe,wBAAwB,E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