{"version":3,"file":"Calendly_Button.DcsRhe2h.mjs","names":[],"sources":["https:/framerusercontent.com/modules/zVCDEI2D1By1Ne6UMkJf/iFgdaqr8FIkeEO5hf3At/Calendly_Button.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Optional \"3D look\" (off by default so existing instances are unchanged):\n// a subtle top highlight, a soft bottom edge and a light drop shadow,\n// layered over the chosen background colour so the colour itself stays the same.\nexport function CalendlyButton(props){const{text,url,background,color,radius,paddingX,paddingY,fill,depth,depthStrength}=props;// Ensure Calendly script is loaded\nReact.useEffect(()=>{if(!document.querySelector(\"#calendly-widget-script\")){const link=document.createElement(\"link\");link.href=\"https://assets.calendly.com/assets/external/widget.css\";link.rel=\"stylesheet\";const script=document.createElement(\"script\");script.id=\"calendly-widget-script\";script.src=\"https://assets.calendly.com/assets/external/widget.js\";script.async=true;document.head.appendChild(link);document.body.appendChild(script);}},[]);const openPopup=()=>{const calendly=window.Calendly;if(calendly){calendly.initPopupWidget({url});}else{console.warn(\"Calendly script not loaded yet.\");}};const k=Math.max(0,Math.min(100,depthStrength??50))/50;const depthStyle=depth?{background:`linear-gradient(180deg, rgba(255,255,255,${(.1*k).toFixed(3)}) 0%, rgba(0,0,0,${(.04*k).toFixed(3)}) 100%), ${background}`,boxShadow:[`inset 0 1px 0 rgba(255,255,255,${(.55*k).toFixed(3)})`,`inset 0 -1px 0 rgba(16,24,40,${(.1*k).toFixed(3)})`,`0 1px 2px rgba(16,24,40,${(.14*k).toFixed(3)})`,`0 4px 12px rgba(16,24,40,${(.12*k).toFixed(3)})`].join(\", \")}:{background};return /*#__PURE__*/_jsx(\"button\",{onClick:openPopup,style:{...depthStyle,color,border:\"none\",padding:`${paddingY}px ${paddingX}px`,borderRadius:radius,fontSize:\"16px\",cursor:\"pointer\",fontWeight:500,// Optional: fill the size set on the canvas (off by default, so existing instances are unchanged)\n...fill?{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxSizing:\"border-box\"}:{}},children:text});}CalendlyButton.defaultProps={text:\"Schedule a Call\",url:\"https://calendly.com/glbnxt?hide_landing_page_details=1&hide_gdpr_banner=1\",background:\"#2d68f6\",color:\"#ffffff\",radius:8,paddingX:20,paddingY:12,fill:false,depth:false,depthStrength:50};// Add controls to the Framer UI panel\naddPropertyControls(CalendlyButton,{text:{type:ControlType.String,title:\"Button Text\"},url:{type:ControlType.String,title:\"Calendly URL\"},background:{type:ControlType.Color,title:\"Background\"},color:{type:ControlType.Color,title:\"Text Color\"},radius:{type:ControlType.Number,title:\"Radius\"},paddingX:{type:ControlType.Number,title:\"Pad X\"},paddingY:{type:ControlType.Number,title:\"Pad Y\"},fill:{type:ControlType.Boolean,title:\"Fill size\",defaultValue:false},depth:{type:ControlType.Boolean,title:\"3D look\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},depthStrength:{type:ControlType.Number,title:\"Depth\",defaultValue:50,min:0,max:100,step:5,unit:\"%\",hidden:p=>!p.depth}});\nexport const __FramerMetadata__ = {\"exports\":{\"CalendlyButton\":{\"type\":\"reactComponent\",\"name\":\"CalendlyButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Calendly_Button.map"],"mappings":"wLAGA,SAAgB,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,MAAI,aAAW,QAAM,SAAO,WAAS,WAAS,OAAK,QAAM,iBAAe,EACzH,MAAoB,CAAC,GAAG,CAAC,SAAS,cAAc,yBAAyB,EAAE,CAAC,IAAM,EAAK,SAAS,cAAc,MAAM,EAAE,EAAK,KAAK,yDAAyD,EAAK,IAAI,aAAa,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,GAAG,yBAAyB,EAAO,IAAI,wDAAwD,EAAO,MAAM,GAAK,SAAS,KAAK,YAAY,CAAI,EAAE,SAAS,KAAK,Y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