{"version":3,"file":"CalendlyButton.DqcuModD.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/TjrnfgZkeUT8K3hwKAPS/ZjFfI18xpWJYlVZLtTwQ/CalendlyButton.js"],"sourcesContent":["// Button component with editable Cal.com attributes for booking integration\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CalendlyButton(props){const{text,calLink,calNamespace,calConfig,backgroundColor,textColor,borderColor,borderWidth,borderRadius,padding,font,showIcon,iconType,hoverBackgroundColor}=props;const buttonRef=useRef(null);useEffect(()=>{if(buttonRef.current){// Set Cal.com attributes\nif(calLink){buttonRef.current.setAttribute(\"data-cal-link\",calLink);}if(calNamespace){buttonRef.current.setAttribute(\"data-cal-namespace\",calNamespace);}if(calConfig){buttonRef.current.setAttribute(\"data-cal-config\",calConfig);}}},[calLink,calNamespace,calConfig]);const renderIcon=()=>{const iconSize=16;const iconProps={width:iconSize,height:iconSize,fill:\"none\",stroke:textColor,strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\"};switch(iconType){case\"arrow-right\":return /*#__PURE__*/_jsx(\"svg\",{...iconProps,viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M5 12h14m-7-7 7 7-7 7\"})});case\"chevron-right\":return /*#__PURE__*/_jsx(\"svg\",{...iconProps,viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"path\",{d:\"m9 18 6-6-6-6\"})});case\"external-link\":return /*#__PURE__*/_jsxs(\"svg\",{...iconProps,viewBox:\"0 0 24 24\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"}),/*#__PURE__*/_jsx(\"path\",{d:\"m15 3 6 6\"}),/*#__PURE__*/_jsx(\"path\",{d:\"m21 3-6 6\"})]});case\"calendar\":return /*#__PURE__*/_jsxs(\"svg\",{...iconProps,viewBox:\"0 0 24 24\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"3\",y:\"4\",width:\"18\",height:\"18\",rx:\"2\",ry:\"2\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"16\",y1:\"2\",x2:\"16\",y2:\"6\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"8\",y1:\"2\",x2:\"8\",y2:\"6\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"3\",y1:\"10\",x2:\"21\",y2:\"10\"})]});default:return null;}};return /*#__PURE__*/_jsxs(\"button\",{ref:buttonRef,style:{backgroundColor,color:textColor,border:`${borderWidth}px solid ${borderColor}`,borderRadius,padding,cursor:\"pointer\",outline:\"none\",...font,transition:\"all 0.2s ease\",display:\"flex\",alignItems:\"center\",gap:\"8px\",whiteSpace:\"nowrap\"},className:\"cal-button\",onMouseEnter:e=>{e.currentTarget.style.backgroundColor=hoverBackgroundColor;},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=backgroundColor;},children:[text,showIcon&&renderIcon()]});}addPropertyControls(CalendlyButton,{text:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Book a Meeting\"},showIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},iconType:{type:ControlType.Enum,title:\"Icon Type\",options:[\"arrow-right\",\"chevron-right\",\"external-link\",\"calendar\"],optionTitles:[\"Arrow Right\",\"Chevron Right\",\"External Link\",\"Calendar\"],defaultValue:\"arrow-right\",hidden:({showIcon})=>!showIcon},calLink:{type:ControlType.String,title:\"Cal Link\",defaultValue:\"thomas-reppa-aerion/30min\",placeholder:\"username/event-type\"},calNamespace:{type:ControlType.String,title:\"Cal Namespace\",defaultValue:\"30min\",placeholder:\"namespace\"},calConfig:{type:ControlType.String,title:\"Cal Config\",defaultValue:'{\"layout\":\"month_view\",\"theme\":\"light\"}',placeholder:\"JSON configuration\",displayTextArea:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#FAFAFA\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:0,min:0,max:10,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,unit:\"px\"},padding:{type:ControlType.String,title:\"Padding\",defaultValue:\"12px 24px\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CalendlyButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CalendlyButton.map"],"mappings":"yLAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,UAAQ,eAAa,YAAU,kBAAgB,YAAU,cAAY,cAAY,eAAa,UAAQ,OAAK,WAAS,WAAS,wBAAsB,EAAY,EAAUA,EAAO,KAAK,CAAC,MAAc,CAAI,EAAU,UAC3Q,GAAS,EAAU,QAAQ,aAAa,gBAAgB,EAAQ,CAAK,GAAc,EAAU,QAAQ,aAAa,qBAAqB,EAAa,CAAK,GAAW,EAAU,QAAQ,aAAa,kBAAkB,EAAU,GAAK,CAAC,EAAQ,EAAa,EAAU,CAAC,CAAC,IAAM,MAAe,CAAC,IAAwB,EAAU,CAAC,MAAM,GAAS,OAAO,GAAS,KAAK,OAAO,OAAO,EAAU,YA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