{"version":3,"file":"Calendly_Button.DoaY7X7n.mjs","names":["React.useEffect","_jsx","__esmMin","init_npm_react_18_3_1","window","c","init_jsx_runtime","ce","init_ssg_sandbox_shims","addPropertyControls","init_framer_BWzg2IRg","ControlType","CalendlyButton","props","text","url","background","color","radius","paddingX","paddingY","fill","depth","depthStrength","link","script","openPopup","calendly","k","depthStyle","init_Calendly_Button","p"],"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":"A,wLAGA,SAAgBY,EAAeC,EAAM,CAAC,GAAK,CAACC,OAAKC,MAAIC,aAAWC,QAAMC,SAAOC,WAASC,WAASC,OAAKC,QAAMC,iBAAeV,EACzHb,MAAoB,CAAC,GAAG,CAAC,SAAS,cAAc,yBAAyB,EAAE,CAAC,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