{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/OLh1QosWlSJvlGPQjZmf/CktHjOmD5pVItOv2EIto/Download_Button.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";// Welcome to Code in Framer\n// Get Started: https://www.framer.com/docs/guides/\n/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/docs/guides/auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function Download(props){const{title,tint,style,file,automaticallyDownload}=props;useEffect(()=>{if(automaticallyDownload&&window==window.parent){const link=document.createElement(\"a\");link.href=file;link.download=\"download\";document.body.appendChild(link);link.click();link.remove();}},[]);return /*#__PURE__*/ _jsx(motion.div,{style:{...style,...containerStyle},children:/*#__PURE__*/ _jsx(motion.div,{onTap:()=>{const link=document.createElement(\"a\");link.href=file;link.download=\"download\";document.body.appendChild(link);link.click();link.remove();},style:{margin:2,padding:25,borderRadius:100,backgroundColor:tint,color:\"white\",fontSize:\"1.35em\",fontWeight:\"bold\"},whileHover:{scale:1.01,backgroundColor:\"#EBC1A9\",cursor:\"pointer\"},children:title})});};Download.defaultProps={tint:\"#09F\",title:\"Download\",automaticallyDownload:false,redirectAfterDownloadUrl:\"\"};addPropertyControls(Download,{tint:{title:\"Tint\",type:ControlType.Color},title:{title:\"Label\",type:ControlType.String},file:{title:\"File\",type:ControlType.File,allowedFileTypes:[]},automaticallyDownload:{title:\"Should automatically download?\",type:ControlType.Boolean}});const containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Download\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}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E,IAAMF,EAAe,CAAC,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,SAAS,QAAQ",
  "names": ["Download", "props", "title", "tint", "style", "file", "automaticallyDownload", "ue", "window", "link", "p", "motion", "containerStyle", "addPropertyControls", "ControlType"]
}
