{"version":3,"file":"LinkButton.krMteInf.mjs","names":[],"sources":["https:/framerusercontent.com/modules/CpsfvzSWHPwLMNaSfogg/CHF92YZ7ptNNezl1Rm57/LinkButton.js"],"sourcesContent":["// Link component with label, URL, unique ID, padding, and font controls\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function LinkButton(props){const{label=\"Click here\",link=\"\",uniqueId=\"\",padding=\"8px 16px\",font,color=\"#676C75\",openInNewTab=false,style}=props;const isFixedWidth=style?.width===\"100%\";const isFixedHeight=style?.height===\"100%\";// Handle link object from ControlType.Link\nconst linkHref=typeof link===\"string\"?link:link?.href||\"\";// Check if the link is an external URL\nconst isExternalLink=linkHref.startsWith(\"http://\")||linkHref.startsWith(\"https://\")||linkHref.startsWith(\"//\");const commonStyles={...style,padding,textDecoration:\"none\",display:\"inline-block\",cursor:\"pointer\",color,...font,...isFixedWidth?{}:{width:\"max-content\"},...isFixedHeight?{}:{height:\"max-content\"},transition:\"color 0.2s ease\",border:\"none\",background:\"transparent\"};const handleMouseEnter=e=>{e.currentTarget.style.color=\"#4A4F5A\";};const handleMouseLeave=e=>{e.currentTarget.style.color=color;};const handleMouseDown=e=>{e.currentTarget.style.color=\"#111827\";};const handleMouseUp=e=>{e.currentTarget.style.color=\"#4A4F5A\";};const handleClick=e=>{if(!isExternalLink){e.preventDefault();window.location.href=linkHref;}};return /*#__PURE__*/_jsx(\"a\",{id:uniqueId,href:isExternalLink?linkHref:\"#\",target:isExternalLink&&openInNewTab?\"_blank\":undefined,rel:isExternalLink&&openInNewTab?\"noopener noreferrer\":undefined,style:commonStyles,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onMouseDown:handleMouseDown,onMouseUp:handleMouseUp,onClick:handleClick,children:label});}addPropertyControls(LinkButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Click here\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"\"},openInNewTab:{type:ControlType.Boolean,title:\"Open in New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},uniqueId:{type:ControlType.String,title:\"Unique ID\",defaultValue:\"\",placeholder:\"Enter unique ID...\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"8px 16px\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#676C75\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LinkButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LinkButton.map"],"mappings":"2KAIG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,aAAa,OAAK,GAAG,WAAS,GAAG,UAAQ,WAAW,OAAK,QAAM,UAAU,eAAa,GAAM,SAAO,EAAY,EAAa,GAAO,QAAQ,OAAa,EAAc,GAAO,SAAS,OACzO,EAAS,OAAO,GAAO,SAAS,EAAK,GAAM,MAAM,GACjD,EAAe,EAAS,WAAW,UAAU,EAAE,EAAS,WAAW,WAAW,EAAE,EAAS,WAAW,KAAK,CAAO,EAAa,CAAC,GAAG,EAAM,UAAQ,eAAe,OAAO,QAAQ,eAAe,OAAO,UAAU,QAAM,GAAG,EAAK,GAAG,EAAa,EAAE,CAAC,CAAC,MAAM,cAAc,CAAC,GAAG,EAAc,EAAE,CAAC,CAAC,OAAO,cAAc,CAAC,WAAW,kBAAkB,OAAO,OAAO,WAAW,cAAc,CAAmW,OAAoB,EAAK,IAAI,CAAC,GAAG,EAAS,KAAK,EAAe,EAAS,IAAI,OAAO,G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