{"version":3,"file":"SmartOSDownloadButton.SIsYFoUn.mjs","names":["useState","startTransition","p"],"sources":["https:/framerusercontent.com/modules/VNOr5u53CZkUSMIU8feR/kF7pcMxKhhGvKI3YJv28/SmartOSDownloadButton.js"],"sourcesContent":["// Smart OS Download Button (mini en móvil)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function SmartOSDownloadButton(props){const{windowsLink=\"https://example.com/windows-download\",macosLink=\"https://example.com/macos-download\",linuxLink=\"https://example.com/linux-download\",buttonText=\"Descargar proyecto\",backgroundColor=\"#1f2937\",textColor=\"#ffffff\",hoverBackgroundColor=\"#374151\",hoverTextColor=\"#ffffff\",customLogo,logoSize=16}=props;const[isHovered,setIsHovered]=useState(false);const[detectedOS,setDetectedOS]=useState(\"unknown\");const[isMobile,setIsMobile]=useState(false);useEffect(()=>{if(typeof window!==\"undefined\"){const ua=window.navigator.userAgent.toLowerCase();if(ua.includes(\"win\"))startTransition(()=>setDetectedOS(\"windows\"));else if(ua.includes(\"mac\"))startTransition(()=>setDetectedOS(\"macos\"));else if(ua.includes(\"linux\"))startTransition(()=>setDetectedOS(\"linux\"));}},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const check=()=>setIsMobile(window.innerWidth<=768);check();window.addEventListener(\"resize\",check);return()=>window.removeEventListener(\"resize\",check);},[]);const handleClick=()=>{if(typeof window===\"undefined\")return;const target=detectedOS===\"macos\"?macosLink:detectedOS===\"linux\"?linuxLink:windowsLink;if(target)window.open(target,\"_blank\",\"noopener,noreferrer\");};// ---------- tamaños ----------\nconst paddingY=isMobile?6:14;const paddingX=isMobile?10:20;const fontSize=isMobile?10.5:14;const minHeight=isMobile?30:44;const borderRadius=isMobile?20:28;const gap=customLogo?isMobile?6:8:0;const computedLogoSize=customLogo?logoSize:0;const currentBg=isHovered?hoverBackgroundColor:backgroundColor;const currentText=isHovered?hoverTextColor:textColor;return /*#__PURE__*/_jsxs(\"button\",{onClick:handleClick,onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),style:{...props.style,backgroundColor:currentBg,color:currentText,border:\"none\",borderRadius,padding:`${paddingY}px ${paddingX}px`,minHeight,cursor:\"pointer\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap,transition:\"all .18s cubic-bezier(.4,0,.2,1)\",transform:isHovered?\"translateY(-1px)\":\"translateY(0)\",boxShadow:isHovered?\"0 3px 8px rgba(0,0,0,.16)\":\"0 1px 3px rgba(0,0,0,.12)\",outline:\"none\",userSelect:\"none\",fontFamily:\"Inter, system-ui, sans-serif\",fontWeight:700,fontSize,letterSpacing:0,lineHeight:1,textTransform:\"uppercase\"},\"aria-label\":`Download for ${detectedOS}`,children:[customLogo?/*#__PURE__*/_jsx(\"img\",{src:customLogo,alt:\"Logo\",style:{width:computedLogoSize,height:computedLogoSize,display:\"block\",objectFit:\"contain\"}}):null,/*#__PURE__*/_jsx(\"span\",{children:buttonText})]});}addPropertyControls(SmartOSDownloadButton,{buttonText:{type:ControlType.String,title:\"Texto\",defaultValue:\"Descargar proyecto\"},windowsLink:{type:ControlType.String,title:\"Link Windows\",defaultValue:\"https://example.com/windows-download\"},macosLink:{type:ControlType.String,title:\"Link macOS\",defaultValue:\"https://example.com/macos-download\"},linuxLink:{type:ControlType.String,title:\"Link Linux\",defaultValue:\"https://example.com/linux-download\"},backgroundColor:{type:ControlType.Color,title:\"Fondo\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Texto\",defaultValue:\"#ffffff\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Fondo hover\",defaultValue:\"#111111\"},hoverTextColor:{type:ControlType.Color,title:\"Texto hover\",defaultValue:\"#ffffff\"},customLogo:{type:ControlType.File,title:\"Tu logo\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\",\"webp\"]},logoSize:{type:ControlType.Number,title:\"Tama\\xf1o logo\",defaultValue:16,min:12,max:64,unit:\"px\",step:1,hidden:p=>!p.customLogo}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmartOSDownloadButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmartOSDownloadButton.map"],"mappings":"6MACmK,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,cAAY,uCAAuC,YAAU,qCAAqC,YAAU,qCAAqC,aAAW,qBAAqB,kBAAgB,UAAU,YAAU,UAAU,uBAAqB,UAAU,iBAAe,UAAU,aAAW,WAAS,IAAI,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAW,GAAeA,EAAS,UAAU,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,CAAC,IAAM,EAAG,EAAO,UAAU,UAAU,aAAa,CAAI,EAAG,SAAS,MAAM,CAAC,MAAoB,EAAc,UAAU,CAAC,CAAS,EAAG,SAAS,MAAM,CAAC,MAAoB,EAAc,QAAQ,CAAC,CAAS,EAAG,SAAS,QAAQ,EAAC,MAAoB,EAAc,QAAQ,CAAC,GAAI,EAAE,CAAC,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAU,EAAY,EAAO,YAAY,IAAI,CAAiD,OAAhD,GAAO,CAAC,EAAO,iBAAiB,SAAS,EAAM,KAAW,EAAO,oBAAoB,SAAS,EAAM,EAAG,EAAE,CAAC,CAAC,IAAM,MAAgB,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAO,IAAa,QAAQ,EAAU,IAAa,QAAQ,EAAU,EAAe,GAAO,EAAO,KAAK,EAAO,SAAS,sBAAsB,EAC33C,EAAS,EAAS,EAAE,GAAS,EAAS,EAAS,GAAG,GAAS,EAAS,EAAS,KAAK,GAAS,EAAU,EAAS,GAAG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