{"version":3,"file":"EditableLinkButton.C_7AefAL.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/pKy7GiEHEHZgUGMqO43j/Wwj7V4gpg5LlV9Bh1AaB/EditableLinkButton.js"],"sourcesContent":["// Button/Link component with editable text and chevron to arrow transition on hover\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function EditableLinkButton(props){const{text,href,anchor,iconType,iconPosition,arrowDirection,backgroundColor,textColor,borderRadius,borderWidth,borderColor,hoverBackgroundColor,hoverBorderColor,hoverTextColor,padding,font,showIcon,iconColor,gap,style}=props;const[isHovered,setIsHovered]=useState(false);const isFixedWidth=style&&style.width===\"100%\";const buttonStyle={display:\"inline-flex\",alignItems:\"center\",gap:`${gap}px`,backgroundColor:isHovered?hoverBackgroundColor:backgroundColor,color:isHovered?hoverTextColor:textColor,borderRadius:`${borderRadius}px`,border:`${borderWidth}px solid ${isHovered?hoverBorderColor:borderColor}`,padding,textDecoration:\"none\",cursor:\"pointer\",transition:\"all 0.2s ease\",position:\"relative\",zIndex:1,...font,...isFixedWidth?{width:\"100%\",justifyContent:\"center\"}:{width:\"max-content\"}};const renderIcon=()=>{if(!showIcon)return null;if(iconType===\"download\"){return /*#__PURE__*/_jsxs(motion.svg,{width:\"18\",height:\"18\",viewBox:\"0 0 18 18\",fill:\"none\",animate:{y:isHovered?2:0},transition:{duration:.3,ease:\"easeInOut\"},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M13.5581 6.55806L9.625 10.4911V1H8.375L8.375 10.4911L4.44194 6.55806L3.55806 7.44194L9 12.8839L14.4419 7.44194L13.5581 6.55806Z\",fill:isHovered?hoverTextColor:iconColor}),/*#__PURE__*/_jsx(\"path\",{d:\"M1 15.5V12H2.25V15.5C2.25 15.6381 2.36193 15.75 2.5 15.75H15.5C15.6381 15.75 15.75 15.6381 15.75 15.5V12H17V15.5C17 16.3284 16.3284 17 15.5 17H2.5C1.67157 17 1 16.3284 1 15.5Z\",fill:isHovered?hoverTextColor:iconColor})]});}// Arrow icon\nconst isLeftArrow=arrowDirection===\"left\";return /*#__PURE__*/_jsxs(motion.svg,{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:isHovered?hoverTextColor:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",animate:{x:isHovered?isLeftArrow?-2:2:0},transition:{duration:.3,ease:\"easeInOut\"},children:[/*#__PURE__*/_jsx(motion.line,{x1:isLeftArrow?\"19\":\"5\",y1:\"12\",x2:isLeftArrow?\"5\":\"19\",y2:\"12\",initial:{opacity:0,pathLength:0},animate:{opacity:isHovered?1:0,pathLength:isHovered?1:0},transition:{duration:.3,ease:\"easeInOut\"}}),/*#__PURE__*/_jsx(motion.polyline,{points:isLeftArrow?isHovered?\"12,5 5,12 12,19\":\"15,18 9,12 15,6\":isHovered?\"12,5 19,12 12,19\":\"9,18 15,12 9,6\",animate:{points:isLeftArrow?isHovered?\"12,5 5,12 12,19\":\"15,18 9,12 15,6\":isHovered?\"12,5 19,12 12,19\":\"9,18 15,12 9,6\"},transition:{duration:.3,ease:\"easeInOut\"}})]});};const content=/*#__PURE__*/_jsxs(_Fragment,{children:[iconPosition===\"before\"&&renderIcon(),/*#__PURE__*/_jsx(\"span\",{children:text}),iconPosition===\"after\"&&renderIcon()]});const handleClick=e=>{if(anchor){e.preventDefault();const targetElement=document.querySelector(anchor);if(targetElement){targetElement.scrollIntoView({behavior:\"smooth\"});window.history.pushState(null,\"\",anchor);}}};const handleMouseEnter=()=>setIsHovered(true);const handleMouseLeave=()=>setIsHovered(false);if(href||anchor){return /*#__PURE__*/_jsx(\"a\",{href:anchor||href,style:buttonStyle,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,children:content});}return /*#__PURE__*/_jsx(\"button\",{style:buttonStyle,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:content});}addPropertyControls(EditableLinkButton,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Learn More\"},href:{type:ControlType.String,title:\"Link URL\",placeholder:\"https://example.com\"},anchor:{type:ControlType.String,title:\"Anchor\",placeholder:\"#section-id\"},iconType:{type:ControlType.Enum,title:\"Icon Type\",options:[\"arrow\",\"download\"],optionTitles:[\"Arrow\",\"Download\"],defaultValue:\"arrow\",displaySegmentedControl:true,hidden:({showIcon})=>!showIcon},iconPosition:{type:ControlType.Enum,title:\"Icon Position\",options:[\"before\",\"after\"],optionTitles:[\"Before\",\"After\"],defaultValue:\"after\",displaySegmentedControl:true,hidden:({showIcon})=>!showIcon},arrowDirection:{type:ControlType.Enum,title:\"Arrow Direction\",options:[\"right\",\"left\"],optionTitles:[\"Right\",\"Left\"],defaultValue:\"right\",displaySegmentedControl:true,hidden:({showIcon,iconType})=>!showIcon||iconType!==\"arrow\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"transparent\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#000\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,unit:\"px\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:0,min:0,max:10,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},hoverBorderColor:{type:ControlType.Color,title:\"Hover Border Color\",defaultValue:\"#333333\"},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\"},showIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#FFFFFF\",hidden:({showIcon})=>!showIcon},gap:{type:ControlType.Number,title:\"Icon Gap\",defaultValue:8,min:0,max:20,unit:\"px\",hidden:({showIcon})=>!showIcon}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EditableLinkButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EditableLinkButton.map"],"mappings":"kPAIG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,SAAO,WAAS,eAAa,iBAAe,kBAAgB,YAAU,eAAa,cAAY,cAAY,uBAAqB,mBAAiB,iBAAe,UAAQ,OAAK,WAAS,YAAU,MAAI,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAa,GAAO,EAAM,QAAQ,OAAa,EAAY,CAAC,QAAQ,cAAc,WAAW,SAAS,IAAI,GAAG,EAAI,IAAI,gBAAgB,EAAU,EAAqB,EAAgB,MAAM,EAAU,EAAe,EAAU,aAAa,GAAG,EAAa,IAAI,OAAO,GAAG,EAAY,WAAW,EAAU,EAAiB,IAAc,UAAQ,eAAe,OAAO,OAAO,UAAU,WAAW,gBAAgB,SAAS,WAAW,OAAO,EAAE,GAAG,EAAK,GAAG,EAAa,CAAC,MAAM,OAAO,eAAe,SAAS,CAAC,CAAC,MAAM,cAAc,CAAC,CAAO,MAAe,CAAC,GAAG,CAAC,EAAS,OAAO,KAAK,GAAG,IAAW,WAAY,OAAoB,EAAM,EAAO,IAAI,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,QAA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