{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/NeJpjyob6pgFGTE4Avps/XASFzpC67OZteJcQrm08/FileDownloadButton.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useState,useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function FileDownloadButton(props){const[blobUrl,setBlobUrl]=useState(null);const initializeBlob=async()=>{const response=await fetch(props.file);const blob=await response.blob();const blobUrl=URL.createObjectURL(blob);setBlobUrl(blobUrl);};useEffect(()=>{initializeBlob();},[]);let button=/*#__PURE__*/ _jsx(\"a\",{href:blobUrl,download:props.fileName,style:{backgroundColor:props.fill,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"max-content\",textDecoration:\"none\",userSelect:\"none\",color:props.fontColor,cursor:props.pointerCursor?\"pointer\":\"auto\",padding:props.paddingIsMixed?`${props.paddingTopLeft}px ${props.paddingTopRight}px ${props.paddingBottomRight}px ${props.paddingBottomLeft}px`:`${props.padding}px`,borderRadius:props.radiusIsMixed?`${props.radiusTopLeft}px ${props.radiusTopRight}px ${props.radiusBottomRight}px ${props.radiusBottomLeft}px`:`${props.radius}px`,...props.font,...props.style},children:props.text});let buttonLayer=button;if(props.effects){buttonLayer=/*#__PURE__*/ _jsx(motion.div,{whileHover:{scale:props.effects.hoverScale},whileTap:{scale:props.effects.pressScale},initial:false,transition:props.effects.transition,style:{...props.style},children:button});}return buttonLayer;};FileDownloadButton.displayName=\"File Download Button\";const effectsDefault={hoverScale:1.1,pressScale:.9};addPropertyControls(FileDownloadButton,{file:{type:ControlType.File,allowedFileTypes:[],description:\"Up to 50MB\"},fileName:{type:ControlType.String,placeholder:\"File\"},text:{type:ControlType.String,defaultValue:\"Download\"},fill:{type:ControlType.Color,defaultValue:\"#EDEDED\",optional:true},fontColor:{type:ControlType.Color,defaultValue:\"#000\"},font:{type:\"font\",controls:\"extended\"},padding:{type:ControlType.FusedNumber,defaultValue:12,toggleKey:\"paddingIsMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"paddingTopLeft\",\"paddingTopRight\",\"paddingBottomRight\",\"paddingBottomLeft\",],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0},radius:{type:ControlType.FusedNumber,defaultValue:8,toggleKey:\"radiusIsMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"radiusTopLeft\",\"radiusTopRight\",\"radiusBottomRight\",\"radiusBottomLeft\",],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0},pointerCursor:{type:ControlType.Boolean,defaultValue:true},effects:{type:ControlType.Object,defaultValue:effectsDefault,optional:true,buttonTitle:\"Hover & Press\",icon:\"effect\",controls:{hoverScale:{type:ControlType.Number,defaultValue:effectsDefault.hoverScale,min:0,step:.01,displayStepper:true},pressScale:{type:ControlType.Number,defaultValue:effectsDefault.pressScale,min:0,step:.01,displayStepper:true},transition:{type:ControlType.Transition}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FileDownloadButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FileDownloadButton.map"],
  "mappings": "8EAGmB,SAARA,EAAoCC,EAAM,CAAC,GAAK,CAACC,EAAQC,CAAU,EAAEC,EAAS,IAAI,EAAQC,EAAe,SAAS,CAAwC,IAAMC,EAAK,MAAnC,MAAM,MAAML,EAAM,IAAI,GAA4B,KAAK,EAAQC,EAAQ,IAAI,gBAAgBI,CAAI,EAAEH,EAAWD,CAAO,CAAE,EAAEK,EAAU,IAAI,CAACF,EAAe,CAAE,EAAE,CAAC,CAAC,EAAE,IAAIG,EAAqBC,EAAK,IAAI,CAAC,KAAKP,EAAQ,SAASD,EAAM,SA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UAAU,iBAAiB,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,kBAAkB,qBAAqB,mBAAoB,EAAE,YAAY,CAAC,IAAI,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,KAAKA,EAAY,YAAY,aAAa,EAAE,UAAU,gBAAgB,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,gBAAgB,iBAAiB,oBAAoB,kBAAmB,EAAE,YAAY,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,cAAc,CAAC,KAAKA,EAAY,QAAQ,aAAa,EAAI,EAAE,QAAQ,CAAC,KAAKA,EAAY,OAAO,aAAaF,EAAe,SAAS,GAAK,YAAY,gBAAgB,KAAK,SAAS,SAAS,CAAC,WAAW,CAAC,KAAKE,EAAY,OAAO,aAAaF,EAAe,WAAW,IAAI,EAAE,KAAK,IAAI,eAAe,EAAI,EAAE,WAAW,CAAC,KAAKE,EAAY,OAAO,aAAaF,EAAe,WAAW,IAAI,EAAE,KAAK,IAAI,eAAe,EAAI,EAAE,WAAW,CAAC,KAAKE,EAAY,UAAU,CAAC,CAAC,CAAC,CAAC",
  "names": ["FileDownloadButton", "props", "blobUrl", "setBlobUrl", "ye", "initializeBlob", "blob", "ue", "button", "p", "buttonLayer", "motion", "effectsDefault", "addPropertyControls", "ControlType"]
}
