{"version":3,"file":"CTA_Button.CmRfK0Py.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/sxACjCqHfG0Jc1Otb0oV/akDya19xe0YKYEk8Ugm0/CTA_Button.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * @framerDisableUnlink\n */export default function CTAButton(props){const[isButtonHovered,setIsButtonHovered]=useState(false);const[isButtonPressed,setIsButtonPressed]=useState(false);const handleClick=e=>{// Check if linking to a section\nif(props.linkType===\"section\"&&props.sectionId){e.preventDefault();// Remove '#' if user included it\nconst cleanId=props.sectionId.startsWith(\"#\")?props.sectionId.substring(1):props.sectionId;const targetElement=document.getElementById(cleanId);if(targetElement){targetElement.scrollIntoView({behavior:props.enableSmoothScroll?\"smooth\":\"auto\",block:\"start\"});}}if(props.onClick){props.onClick(e);}};// Determine the actual href based on linkType\nconst getHref=()=>{if(props.linkType===\"section\"){if(!props.sectionId)return\"\";// Remove '#' if user included it, then add it back for href\nconst cleanId=props.sectionId.startsWith(\"#\")?props.sectionId.substring(1):props.sectionId;return`#${cleanId}`;}return props.url||\"\";};// Variant configurations\nconst variants={blueBlackShadow:{button:{default:{bg:\"#2388FF\",color:\"#FFFFFF\"},hover:{bg:\"#FFFFFF\",color:\"#2388FF\"}},shadow:{bg:\"#020710\",border:false}},whiteBlackShadow:{button:{default:{bg:\"#FFFFFF\",color:\"#2388FF\"},hover:{bg:\"#2388FF\",color:\"#FFFFFF\"}},shadow:{bg:\"#020710\",border:false}},whiteBlueShadow:{button:{default:{bg:\"#FFFFFF\",color:\"#2388FF\"},hover:{bg:\"#2388FF\",color:\"#FFFFFF\"}},shadow:{bg:\"#2388FF\",border:true}},blueWhiteShadow:{button:{default:{bg:\"#2388FF\",color:\"#FFFFFF\"},hover:{bg:\"#FFFFFF\",color:\"#2388FF\"}},shadow:{bg:\"#FFFFFF\",border:true}}};const currentVariant=variants[props.variant]||variants.blueBlackShadow;const currentColors=isButtonHovered?currentVariant.button.hover:currentVariant.button.default;const buttonContainerStyle={position:\"relative\",display:\"inline-block\",width:\"fit-content\",textDecoration:\"none\"};const buttonShadowStyle={position:\"absolute\",backgroundColor:currentVariant.shadow.bg,width:\"100%\",height:\"100%\",left:\"5px\",top:\"5px\",...currentVariant.shadow.border&&{border:\"2px solid #020710\"}};const buttonStyle={position:\"relative\",left:isButtonPressed?5:0,top:isButtonPressed?5:0,padding:\"16px 36px\",backgroundColor:currentColors.bg,color:currentColors.color,border:\"2px solid #020710\",boxSizing:\"border-box\",fontSize:\"18.408px\",fontFamily:\"Inter, sans-serif\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"normal\",textAlign:\"center\",cursor:\"pointer\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:\"9.535px\",whiteSpace:\"nowrap\",transition:\"background-color 0.2s ease, color 0.2s ease, left 0.1s ease, top 0.1s ease\"};const href=getHref();if(href){return /*#__PURE__*/_jsxs(\"a\",{href:href,target:props.linkType===\"url\"&&props.openInNewTab?\"_blank\":\"_self\",rel:props.linkType===\"url\"&&props.openInNewTab?\"noopener noreferrer\":undefined,style:buttonContainerStyle,onClick:handleClick,children:[/*#__PURE__*/_jsx(\"div\",{style:buttonShadowStyle}),/*#__PURE__*/_jsx(\"div\",{style:buttonStyle,onMouseEnter:()=>setIsButtonHovered(true),onMouseLeave:()=>{setIsButtonHovered(false);setIsButtonPressed(false);},onMouseDown:()=>setIsButtonPressed(true),onMouseUp:()=>setIsButtonPressed(false),children:props.text})]});}return /*#__PURE__*/_jsxs(\"div\",{style:buttonContainerStyle,onClick:handleClick,children:[/*#__PURE__*/_jsx(\"div\",{style:buttonShadowStyle}),/*#__PURE__*/_jsx(\"div\",{style:buttonStyle,onMouseEnter:()=>setIsButtonHovered(true),onMouseLeave:()=>{setIsButtonHovered(false);setIsButtonPressed(false);},onMouseDown:()=>setIsButtonPressed(true),onMouseUp:()=>setIsButtonPressed(false),children:props.text})]});}CTAButton.defaultProps={text:\"Get Started\",linkType:\"url\",url:\"\",sectionId:\"\",openInNewTab:true,variant:\"blueBlackShadow\",enableSmoothScroll:true};addPropertyControls(CTAButton,{variant:{title:\"Variant\",type:ControlType.Enum,options:[\"blueBlackShadow\",\"whiteBlackShadow\",\"whiteBlueShadow\",\"blueWhiteShadow\"],optionTitles:[\"Blue (Black Shadow)\",\"White (Black Shadow)\",\"White (Blue Shadow)\",\"Blue (White Shadow)\"],defaultValue:\"blueBlackShadow\"},text:{title:\"Button Text\",type:ControlType.String},linkType:{title:\"Link Type\",type:ControlType.Enum,options:[\"url\",\"section\"],optionTitles:[\"URL\",\"Section on Page\"],defaultValue:\"url\"},url:{title:\"URL\",type:ControlType.String,placeholder:\"https://example.com\",hidden:props=>props.linkType!==\"url\"},openInNewTab:{title:\"Open in New Tab\",type:ControlType.Boolean,defaultValue:true,hidden:props=>props.linkType!==\"url\"},sectionId:{title:\"Section ID\",type:ControlType.String,placeholder:\"#section\",description:\"ID of the section to scroll to\",hidden:props=>props.linkType!==\"section\"},enableSmoothScroll:{title:\"Enable Smooth Scroll\",type:ControlType.Boolean,defaultValue:true,hidden:props=>props.linkType!==\"section\"},onClick:{title:\"On Click\",type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CTAButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CTA_Button.map"],"mappings":"yQAEG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,EAAgB,GAAoBA,EAAS,GAAM,CAAM,CAAC,EAAgB,GAAoBA,EAAS,GAAM,CAAO,EAAY,GAAG,CACrL,GAAG,EAAM,WAAW,WAAW,EAAM,UAAU,CAAC,EAAE,gBAAgB,CAClE,IAAM,EAAQ,EAAM,UAAU,WAAW,IAAI,CAAC,EAAM,U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