{"version":3,"file":"Download_Comp.fkt-CSSJ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/D6T0CYrXYOLMlgVOgq8z/JkBJ9tD6nwVA9aQTuIbo/Download_Comp.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{Frame,addPropertyControls,ControlType}from\"framer\";function transformGoogleDriveLink(url){const match=url.match(/(?:\\/d\\/|id=)([\\w-]{25,})/);if(match&&match[1]){return`https://drive.google.com/uc?export=download&id=${match[1]}`;}return url;}export function DownloadButton(props){const{url,label,filename,background,color,borderRadius,fontSize,fontFamily,fontWeight,padding}=props;const handleDownload=()=>{const link=document.createElement(\"a\");link.href=transformGoogleDriveLink(url);if(filename)link.download=filename;link.target=\"_blank\";document.body.appendChild(link);link.click();document.body.removeChild(link);};return /*#__PURE__*/_jsx(Frame,{onTap:handleDownload,size:\"100%\",background:background,radius:borderRadius,style:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",cursor:\"pointer\",color,fontSize,fontFamily,fontWeight,userSelect:\"none\",paddingTop:padding.top,paddingRight:padding.right,paddingBottom:padding.bottom,paddingLeft:padding.left,boxSizing:\"border-box\"},children:label});}DownloadButton.defaultProps={label:\"Download\",url:\"\",background:\"#007bff\",color:\"#ffffff\",borderRadius:8,fontSize:16,fontFamily:\"Inter, sans-serif\",fontWeight:500,padding:{top:15,right:15,bottom:15,left:15}};addPropertyControls(DownloadButton,{label:{type:ControlType.String,title:\"Label\",placeholder:\"Download File\"},url:{type:ControlType.String,title:\"File URL\"},filename:{type:ControlType.String,title:\"Filename\",placeholder:\"Optional\"},background:{type:ControlType.Color,title:\"Background\"},color:{type:ControlType.Color,title:\"Text Color\"},borderRadius:{type:ControlType.Number,title:\"Radius\"},fontSize:{type:ControlType.Number,title:\"Font Size\"},fontFamily:{type:ControlType.String,title:\"Font Family\"},fontWeight:{type:ControlType.Enum,title:\"Weight\",options:[400,500,600,700],optionTitles:[\"Regular\",\"Medium\",\"Semi Bold\",\"Bold\"]},padding:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:15,toggleKey:\"isUniform\",toggleTitles:[\"All Sides\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"DownloadButton\":{\"type\":\"reactComponent\",\"name\":\"DownloadButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Download_Comp.map"],"mappings":"mKAAqG,SAAS,EAAyB,EAAI,CAAC,IAAM,EAAM,EAAI,MAAM,2BAA2B,EAA0F,OAArF,GAAO,EAAM,GAAU,kDAAkD,EAAM,KAAa,CAAI,CAAC,SAAgB,EAAe,EAAM,CAAC,GAAK,CAAC,MAAI,QAAM,WAAS,aAAW,QAAM,eAAa,WAAS,aAAW,aAAW,WAAS,EAAsP,OAAoB,EAAK,EAAM,CAAC,UAAvP,CAAC,IAAM,EAAK,SAAS,cAAc,GAAG,EAAE,EAAK,KAAK,EAAyB,CAAG,EAAK,IAAS,EAAK,SAAS,GAAS,EAAK,OAAO,SAAS,SAAS,KAAK,YAAY,CAAI,EAAE,EAAK,MAAM,EAAE,SAAS,KAAK,YAAY,CAAI,CAAE,EAAuD,KAAK,OAAkB,aAAW,OAAO,EAAa,MAAM,CAAC,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,OAAO,UAAU,QAAM,WAAS,aAAW,aAAW,WAAW,OAAO,WAAW,EAAQ,IAAI,aAAa,EAAQ,MAAM,cAAc,EAAQ,OAAO,YAAY,EAAQ,KAAK,UAAU,YAAY,EAAE,SAAS,CAAK,CAAC,CAAE,iBAA1/B,IAA0D,EAAi8B,EAAe,aAAa,CAAC,MAAM,WAAW,IAAI,GAAG,WAAW,UAAU,MAAM,UAAU,aAAa,EAAE,SAAS,GAAG,WAAW,oBAAoB,WAAW,IAAI,QAAQ,CAAC,IAAI,GAAG,M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