{"version":3,"file":"Button.BqaAEFBI.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/4nLmu6sXK3xfBVXes8MF/YR4TOoLGsHlv7wlqTGbA/Button.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const sizePresets={small:{paddingX:12,paddingY:8,fontSize:14},medium:{paddingX:20,paddingY:12,fontSize:16},large:{paddingX:28,paddingY:16,fontSize:18}};export default function GreenButton(props){const{label,href,linkPage,newTab,radius,size,customPaddingX,customPaddingY,fullWidth,align,backgroundColor,hoverColor,activeColor,textColor,style}=props;const[isHover,setIsHover]=React.useState(false);const[isActive,setIsActive]=React.useState(false);// Choose colors for current state\nconst bg=isActive?activeColor:isHover?hoverColor:backgroundColor;const{paddingX,paddingY,fontSize}=size===\"custom\"?{paddingX:customPaddingX,paddingY:customPaddingY,fontSize:16}:sizePresets[size];// Style objects\nconst buttonStyle={backgroundColor:bg,color:textColor,border:\"none\",borderRadius:radius,padding:`${paddingY}px ${paddingX}px`,cursor:\"pointer\",textDecoration:\"none\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",width:fullWidth?\"100%\":\"auto\",fontWeight:600,fontSize,fontFamily:\"inherit\",lineHeight:1.2,boxShadow:isActive?\"inset 0 2px 4px rgba(0,0,0,0.3)\":\"0 4px 8px rgba(0,0,0,0.15)\",transition:\"background-color 120ms ease, transform 80ms ease, box-shadow 120ms ease\",transform:isActive?\"translateY(2px)\":undefined,outline:\"none\"};const wrapperStyle={width:fullWidth?\"100%\":\"auto\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:align===\"left\"?\"flex-start\":align===\"right\"?\"flex-end\":\"center\",...style};// Normalize internal links to avoid 404s when published under custom domains or path prefixes\nconst normalizeLink=lp=>{if(!lp)return undefined;// If it's an absolute URL, drop origin so Framer's router can handle the path\ntry{const url=new URL(lp,window.location.origin);const normalized=`${url.pathname}${url.hash}`;return normalized.startsWith(\"/\")?normalized:`/${normalized}`;}catch{return lp.startsWith(\"/\")?lp:`/${lp}`;}};const internalHref=linkPage?normalizeLink(linkPage):undefined;const isExternal=!internalHref&&!!href;const targetHref=internalHref||href||\"#\";return /*#__PURE__*/_jsx(\"div\",{style:wrapperStyle,onMouseEnter:()=>setIsHover(true),onMouseLeave:()=>{setIsHover(false);setIsActive(false);},onMouseDown:()=>setIsActive(true),onMouseUp:()=>setIsActive(false),children:/*#__PURE__*/_jsx(\"a\",{href:targetHref,target:isExternal&&newTab?\"_blank\":undefined,rel:isExternal&&newTab?\"noopener noreferrer\":undefined,style:buttonStyle,\"aria-label\":label,role:\"button\",children:label})});}GreenButton.defaultProps={label:\"Click me\",href:\"\",linkPage:\"\",newTab:true,radius:12,size:\"medium\",customPaddingX:20,customPaddingY:12,fullWidth:false,align:\"center\",backgroundColor:\"#6EDD93\",hoverColor:\"#66E39A\",activeColor:\"#59CF8C\",textColor:\"#000000\"};addPropertyControls(GreenButton,{label:{type:ControlType.String,title:\"Text\"},href:{type:ControlType.String,title:\"External Link\"},linkPage:{type:ControlType.Link,title:\"Page Link\"},newTab:{type:ControlType.Boolean,title:\"Open in new tab\"},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:64,unit:\"px\",step:1},size:{type:ControlType.Enum,title:\"Size\",options:[\"small\",\"medium\",\"large\",\"custom\"],optionTitles:[\"Small\",\"Medium\",\"Large\",\"Custom\"]},customPaddingX:{type:ControlType.Number,title:\"Custom Padding X\",min:6,max:64,unit:\"px\",step:1,hidden:props=>props.size!==\"custom\"},customPaddingY:{type:ControlType.Number,title:\"Custom Padding Y\",min:4,max:48,unit:\"px\",step:1,hidden:props=>props.size!==\"custom\"},fullWidth:{type:ControlType.Boolean,title:\"Full width\"},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"]},backgroundColor:{type:ControlType.Color,title:\"Background\"},hoverColor:{type:ControlType.Color,title:\"Hover\"},activeColor:{type:ControlType.Color,title:\"Active\"},textColor:{type:ControlType.Color,title:\"Text Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GreenButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button.map"],"mappings":"0SAAmR,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,WAAS,SAAO,SAAO,OAAK,iBAAe,iBAAe,YAAU,QAAM,kBAAgB,aAAW,cAAY,YAAU,SAAO,EAAW,CAAC,EAAQ,GAAYA,EAAe,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAe,GAAM,CACljB,EAAG,EAAS,EAAY,EAAQ,EAAW,EAAqB,CAAC,WAAS,WAAS,YAAU,IAAO,SAAS,CAAC,SAAS,EAAe,SAAS,EAAe,SAAS,GAAG,CAAC,EAAY,GACvL,EAAY,CAAC,gBAAgB,EAAG,MAAM,EAAU,OAAO,OAAO,aAAa,EAAO,QAAQ,GAAG,EAAS,KAAK,EAAS,IAAI,OAAO,UAAU,eAAe,OAAO,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,MAAM,EAAU,OAAO,OAAO,WAAW,IAAI,WAAS,WAAW,UAAU,WAAW,IAAI,UAAU,EAAS,kCAAkC,6BAA6B,WAAW,0EAA0E,UAAU,EAAS,kBAAkB,IAAA,GAAU,QAAQ,OAAO,CAAO,EAAa,CAAC,MAAM,EAAU,OAAO,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,IAAQ,OAAO,aAAa,IAAQ,QAAQ,WAAW,SAAS,GAAG,EAAM,CAE/gB,EAAa,GAD5M,GAAI,CAAK,KAC7B,GAAG,CAAC,IAAM,EAAI,IAAI,IAAI,EAAG,EAAO,SAAS,OAAO,CAAO,EAAW,GAAG,EAAI,WAAW,EAAI,OAAO,OAAO,EAAW,WAAW,IAAI,CAAC,EAAW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