{"version":3,"file":"TextCTA.fSC8wL02.mjs","names":[],"sources":["https:/framerusercontent.com/modules/gB7m62OTyvB9uV0PbS2V/eMV8U3S8bj96hl3YsCYY/TextCTA.js"],"sourcesContent":["// Text-only CTA that opens a PDF from Google Drive link\n// Supports opening in same or different tab (different tab is default)\n// Includes all built-in text properties for full customization\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function TextCTA(props){const{text,pdfLink,action,openInNewTab,textColor,hoverColor,font,textDecoration}=props;const handleClick=e=>{e.preventDefault();if(typeof window!==\"undefined\"){if(action===\"download\"){// Download the PDF\nconst link=document.createElement(\"a\");link.href=pdfLink;link.download=pdfLink.split(\"/\").pop()||\"document.pdf\";document.body.appendChild(link);link.click();document.body.removeChild(link);}else{// View the PDF\nif(openInNewTab){window.open(pdfLink,\"_blank\",\"noopener,noreferrer\");}else{window.location.href=pdfLink;}}}};const isFixedWidth=props?.style&&props.style.width===\"100%\";const baseTextDecoration=textDecoration===\"always\"?\"underline\":\"none\";const hoverTextDecoration=textDecoration===\"hover\"||textDecoration===\"always\"?\"underline\":\"none\";return /*#__PURE__*/_jsx(\"a\",{href:pdfLink,onClick:handleClick,target:openInNewTab?\"_blank\":\"_self\",rel:openInNewTab?\"noopener noreferrer\":undefined,style:{position:\"relative\",display:\"inline-block\",...isFixedWidth?{width:\"100%\"}:{width:\"max-content\"},color:textColor,textDecoration:baseTextDecoration,cursor:\"pointer\",transition:\"color 0.2s ease, text-decoration 0.2s ease\",...font},onMouseEnter:e=>{e.currentTarget.style.color=hoverColor;e.currentTarget.style.textDecoration=hoverTextDecoration;},onMouseLeave:e=>{e.currentTarget.style.color=textColor;e.currentTarget.style.textDecoration=baseTextDecoration;},children:text});}addPropertyControls(TextCTA,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Download PDF\"},pdfLink:{type:ControlType.String,title:\"PDF Link\",defaultValue:\"https://drive.google.com/file/d/YOUR_FILE_ID/view\",placeholder:\"Paste Google Drive link...\"},action:{type:ControlType.Enum,title:\"Action\",options:[\"view\",\"download\"],optionTitles:[\"View\",\"Download\"],defaultValue:\"view\",displaySegmentedControl:true},openInNewTab:{type:ControlType.Boolean,title:\"Open In\",defaultValue:true,enabledTitle:\"New Tab\",disabledTitle:\"Same Tab\",hidden:({action})=>action===\"download\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"40px\",variant:\"Medium\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#0099FF\"},textDecoration:{type:ControlType.Enum,title:\"Underline\",options:[\"none\",\"always\",\"hover\"],optionTitles:[\"None\",\"Always\",\"On Hover\"],defaultValue:\"hover\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextCTA\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextCTA.map"],"mappings":"0KAMG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,OAAK,UAAQ,SAAO,eAAa,YAAU,aAAW,OAAK,kBAAgB,EAAY,EAAY,GAAG,CAAoB,GAAnB,EAAE,eAAe,EAAY,IAAS,OAAa,GAAG,IAAS,WAAW,CACjO,IAAM,EAAK,SAAS,cAAc,GAAG,EAAE,EAAK,KAAK,EAAQ,EAAK,SAAS,EAAQ,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,eAAe,SAAS,KAAK,YAAY,CAAI,EAAE,EAAK,MAAM,EAAE,SAAS,KAAK,YAAY,CAAI,CAAE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