{"version":3,"file":"Button.BC_ImBf4.mjs","names":[],"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,QAAM,CAAC,EAAW,CAAC,EAAQ,EAAW,CAAC,GAAe,EAAM,CAAM,CAAC,EAAS,EAAY,CAAC,GAAe,EAAM,CACljB,EAAG,EAAS,EAAY,EAAQ,EAAW,EAAqB,CAAC,WAAS,WAAS,WAAS,CAAC,IAAO,SAAS,CAAC,SAAS,EAAe,SAAS,EAAe,SAAS,EAAG,EAAC,EAAY,GACvL,EAAY,CAAC,gBAAgB,EAAG,MAAM,EAAU,OAAO,OAAO,aAAa,EAAO,WAAW,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,sBAAA,GAA4B,QAAQ,MAAO,EAAO,EAAa,CAAC,MAAM,EAAU,OAAO,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,IAAQ,OAAO,aAAa,IAAQ,QAAQ,WAAW,SAAS,GAAG,CAAM,EAC5tB,EAAc,GAAI,CAAK,KAC7B,GAAG,CAAC,IAAM,EAAI,IAAI,IAAI,EAAG,EAAO,SAAS,QAAc,KAAc,EAAI,WAAW,EAAI,OAAO,MAAO,GAAW,WAAW,IAAI,CAAC,GAAY,GAAG,GAAc,MAA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