{"version":3,"file":"DownloadButton.Cr3XDPFD.mjs","names":["useMemo","useState"],"sources":["https:/framerusercontent.com/modules/vK6cSvabUuCkmnsXhyGs/inT7H4SV66KAhf9YooRQ/DownloadButton.js"],"sourcesContent":["// Download Button mit automatischer Geräte-Erkennung und dynamischem Link\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useMemo,useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Download Button erkennt Gerät und setzt Link entsprechend\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function DownloadButton(props){const{iosUrl,androidUrl,windowsUrl,macosUrl,linuxUrl,otherUrl,label,background,color,font,borderRadius,style}=props;// Geräte-Erkennung\nconst platform=useMemo(()=>{if(typeof window===\"undefined\")return\"other\";const ua=window.navigator.userAgent||\"\";if(/iPad|iPhone|iPod/.test(ua))return\"ios\";if(/Android/.test(ua))return\"android\";if(/Win/.test(ua))return\"windows\";if(/Mac/.test(ua))return\"macos\";if(/Linux/.test(ua))return\"linux\";return\"other\";},[]);const url=platform===\"ios\"?iosUrl:platform===\"android\"?androidUrl:platform===\"windows\"?windowsUrl:platform===\"macos\"?macosUrl:platform===\"linux\"?linuxUrl:otherUrl;// Buttontext dynamisch anpassen\nconst platformLabel=platform===\"ios\"?\"iOS\":platform===\"android\"?\"Android\":platform===\"windows\"?\"Windows\":platform===\"macos\"?\"macOS\":platform===\"linux\"?\"Linux\":\"your device\";const buttonText=`${label} for ${platformLabel}`;// Schein-Animation\nconst[hovered,setHovered]=useState(false);const[flash,setFlash]=useState(false);useEffect(()=>{if(hovered){setFlash(true);const t=setTimeout(()=>setFlash(false),350);return()=>clearTimeout(t);}},[hovered]);return /*#__PURE__*/_jsxs(\"a\",{href:url,target:\"_blank\",rel:\"noopener noreferrer\",style:{position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:10,background,color,border:\"none\",borderRadius,padding:\"14px 32px\",textDecoration:\"none\",textAlign:\"center\",cursor:\"pointer\",minWidth:120,minHeight:44,fontSize:font.fontSize,fontWeight:font.fontWeight,fontFamily:font.fontFamily,lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,boxShadow:flash?`0 0 0 4px rgba(0,180,255,0.25), 0 2px 16px 0 rgba(0,180,255,0.18)`:\"0 2px 8px 0 rgba(0,0,0,0.08)\",transition:\"box-shadow 0.25s cubic-bezier(.4,2,.6,1)\",...style},\"aria-label\":buttonText,role:\"button\",onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",\"aria-hidden\":\"true\",style:{display:\"block\"},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M10 3v10m0 0l-4-4m4 4l4-4\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"rect\",{x:\"4\",y:\"17\",width:\"12\",height:\"2\",rx:\"1\",fill:\"currentColor\"})]}),buttonText]});}addPropertyControls(DownloadButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Download\"},iosUrl:{type:ControlType.Link,title:\"iOS Link\",defaultValue:\"https://apps.apple.com/\"},androidUrl:{type:ControlType.Link,title:\"Android Link\",defaultValue:\"https://play.google.com/store\"},windowsUrl:{type:ControlType.Link,title:\"Windows Link\",defaultValue:\"https://www.microsoft.com/store/apps\"},macosUrl:{type:ControlType.Link,title:\"macOS Link\",defaultValue:\"https://apps.apple.com/mac\"},linuxUrl:{type:ControlType.Link,title:\"Linux Link\",defaultValue:\"https://snapcraft.io/store\"},otherUrl:{type:ControlType.Link,title:\"Fallback Link\",defaultValue:\"https://example.com\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#111111\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DownloadButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DownloadButton.map"],"mappings":"6MAMG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,SAAO,aAAW,aAAW,WAAS,WAAS,WAAS,QAAM,aAAW,QAAM,OAAK,eAAa,SAAO,EACzJ,EAASA,MAAY,CAAC,GAAU,IAAS,OAAY,MAAM,QAAQ,IAAM,EAAG,EAAO,UAAU,WAAW,GAAwL,MAAlL,mBAAmB,KAAK,EAAG,CAAO,MAAS,UAAU,KAAK,EAAG,CAAO,UAAa,MAAM,KAAK,EAAG,CAAO,UAAa,MAAM,KAAK,EAAG,CAAO,QAAW,QAAQ,KAAK,EAAG,CAAO,QAAc,SAAU,EAAE,CAAC,CAAO,EAAI,IAAW,MAAM,EAAO,IAAW,UAAU,EAAW,IAAW,UAAU,EAAW,IAAW,QAAQ,EAAS,IAAW,QAAQ,EAAS,EACjS,EAAW,GAAG,EAAM,OAAnL,IAAW,MAAM,MAAM,IAAW,UAAU,UAAU,IAAW,UAAU,UAAU,IAAW,QAAQ,QAAQ,IAAW,QAAQ,QAAQ,gBAC1J,CAAC,EAAQ,GAAYC,EAAS,GAAM,CAAM,CAAC,EAAM,GAAUA,EAAS,GAAM,CAA+H,OAA9H,MAAc,CAAC,GAAG,EAAQ,CAAC,EAAS,GAAK,CAAC,IAAM,EAAE,eAAe,EAAS,GAAM,CAAC,IAAI,CAAC,UAAU,aAAa,EA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