{"version":3,"file":"GenericButton.b5MUpzcq.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/wbdMpFqfzG090q5I1lVF/m2v8oUjtl2onR290oJQ6/GenericButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 56\n */export default function GenericButton(props){const{label,link,openInNewTab,smoothScroll,backgroundColor,hoverBackgroundColor,textColor,hoverTextColor,borderRadius,border,hoverBorderColor,padding,buttonFont,hoverShadow,shadow,showLeftIcon,leftIcon=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",leftHoverIcon,leftIconWidth,leftIconHeight,showRightIcon,rightIcon=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",rightHoverIcon,rightIconWidth,rightIconHeight,iconGap}=props;const[hover,setHover]=React.useState(false);const[active,setActive]=React.useState(false);const buttonBorder={...border,borderColor:hover&&hoverBorderColor?hoverBorderColor:border?.borderColor};const handleClick=e=>{if(!link)return;const isLocal=link.startsWith(\"#\");if(smoothScroll&&isLocal){e.preventDefault();const target=document.querySelector(link);if(target)target.scrollIntoView({behavior:\"smooth\"});}else if(openInNewTab){if(typeof window!==\"undefined\"){window.open(link,\"_blank\",\"noopener,noreferrer\");}}else{if(typeof window!==\"undefined\"){// Use SPA navigation if possible\nconst a=document.createElement(\"a\");a.href=link;a.style.display=\"none\";document.body.appendChild(a);const nativeNavigation=window.location.origin===a.origin&&link.startsWith(\"/\")&&!link.startsWith(\"//\");if(nativeNavigation){a.click();setTimeout(()=>document.body.removeChild(a),100);}else{window.location.assign(link);document.body.removeChild(a);}}}};const renderIcon=(show,icon,hoverIcon,width,height)=>{if(!show)return null;const src=hover&&hoverIcon?hoverIcon:icon;if(!src)return null;return /*#__PURE__*/_jsx(\"img\",{src:src,alt:\"\",style:{width,height,objectFit:\"contain\",transition:\"opacity 0.25s ease\"}});};return /*#__PURE__*/_jsx(\"div\",{style:{...props.style},children:/*#__PURE__*/_jsxs(\"button\",{onClick:handleClick,onMouseEnter:()=>setHover(true),onMouseLeave:()=>{setHover(false);setActive(false);},onMouseDown:()=>setActive(true),onMouseUp:()=>setActive(false),style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:iconGap,backgroundColor:hover?hoverBackgroundColor:backgroundColor,color:hover?hoverTextColor:textColor,borderRadius,padding,cursor:\"pointer\",transition:\"all 0.3s ease\",boxShadow:hoverShadow?hover?shadow:\"none\":\"none\",textDecoration:\"none\",...buttonFont,...buttonBorder,transform:active?\"scale(1)\":\"none\",filter:active?\"brightness(0.96)\":\"none\"},children:[renderIcon(showLeftIcon,leftIcon,leftHoverIcon,leftIconWidth,leftIconHeight),/*#__PURE__*/_jsx(\"span\",{children:label}),renderIcon(showRightIcon,rightIcon,rightHoverIcon,rightIconWidth,rightIconHeight)]})});}GenericButton.displayName=\"Generic Button\";addPropertyControls(GenericButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Click Me\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"/\"},openInNewTab:{type:ControlType.Boolean,title:\"Open in New Tab\",defaultValue:false},smoothScroll:{type:ControlType.Boolean,title:\"Smooth Scroll\",defaultValue:false},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#004049\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#00606E\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"12px\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderWidth:0,borderStyle:\"solid\",borderColor:\"transparent\"}},hoverBorderColor:{type:ControlType.Color,title:\"Hover Border\",optional:true},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"14px 28px\"},hoverShadow:{type:ControlType.Boolean,title:\"Hover Shadow\",defaultValue:true},shadow:{type:ControlType.BoxShadow,title:\"Hover Shadow\",hidden:({hoverShadow})=>!hoverShadow,defaultValue:\"0 4px 10px rgba(0, 64, 73, 0.15), 0 8px 20px rgba(0, 64, 73, 0.10)\"},buttonFont:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Semibold\",fontSize:\"14px\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},showLeftIcon:{type:ControlType.Boolean,title:\"Show Left Icon\",defaultValue:false},leftIcon:{type:ControlType.File,title:\"Left Icon\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\",\"gif\",\"webp\"],hidden:({showLeftIcon})=>!showLeftIcon},leftHoverIcon:{type:ControlType.File,title:\"Hover Left Icon\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\",\"gif\",\"webp\"],hidden:({showLeftIcon})=>!showLeftIcon},leftIconWidth:{type:ControlType.Number,title:\"Left Icon Width\",defaultValue:20,min:8,max:100,unit:\"px\",hidden:({showLeftIcon})=>!showLeftIcon},leftIconHeight:{type:ControlType.Number,title:\"Left Icon Height\",defaultValue:20,min:8,max:100,unit:\"px\",hidden:({showLeftIcon})=>!showLeftIcon},showRightIcon:{type:ControlType.Boolean,title:\"Show Right Icon\",defaultValue:false},rightIcon:{type:ControlType.File,title:\"Right Icon\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\",\"gif\",\"webp\"],hidden:({showRightIcon})=>!showRightIcon},rightHoverIcon:{type:ControlType.File,title:\"Hover Right Icon\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\",\"gif\",\"webp\"],hidden:({showRightIcon})=>!showRightIcon},rightIconWidth:{type:ControlType.Number,title:\"Right Icon Width\",defaultValue:20,min:8,max:100,unit:\"px\",hidden:({showRightIcon})=>!showRightIcon},rightIconHeight:{type:ControlType.Number,title:\"Right Icon Height\",defaultValue:20,min:8,max:100,unit:\"px\",hidden:({showRightIcon})=>!showRightIcon},iconGap:{type:ControlType.Number,title:\"Icon Gap\",defaultValue:8,min:0,max:40,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GenericButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicHeight\":\"56\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GenericButton.map"],"mappings":"iTAKG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,eAAa,eAAa,kBAAgB,uBAAqB,YAAU,iBAAe,eAAa,SAAO,mBAAiB,UAAQ,aAAW,cAAY,SAAO,eAAa,WAAS,sEAAsE,gBAAc,gBAAc,iBAAe,gBAAc,YAAU,sEAAsE,iBAAe,iBAAe,kBAAgB,WAAS,EAAW,CAAC,EAAM,GAAUA,EAAe,GAAM,CAAM,CAAC,EAAO,GAAWA,EAAe,GAAM,CAAO,EAAa,CAAC,GAAG,EAAO,YAAY,GAAO,EAAiB,EAAiB,GAAQ,YAAY,CAAO,EAAY,GAAG,CAAC,GAAG,CAAC,EAAK,OAAO,IAAM,EAAQ,EAAK,WAAW,IAAI,CAAC,GAAG,GAAc,EAAQ,CAAC,EAAE,gBAAgB,CAAC,IAAM,EAAO,SAAS,cAAc,EAAK,CAAI,GAAO,EAAO,eAAe,CAAC,SAAS,SAAS,CAAC,SAAU,EAAwB,IAAS,QAAa,EAAO,KAAK,EAAK,SAAS,sBAAsB,SAAkB,IAAS,OAAY,CAC3iC,IAAM,EAAE,SAAS,cAAc,IAAI,CAAC,EAAE,KAAK,EAAK,EAAE,MAAM,QAAQ,OA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