{"version":3,"file":"DownloadCard.AebJBxRF.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/72RKTI9Z8bGOhfM5Oub8/xnunw7SUzugFR1fUoVY7/DownloadCard.js"],"sourcesContent":["// Čtvercová karta pro stažení PDF s animací a property controls\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useCallback}from\"react\";import{addPropertyControls,ControlType,RenderTarget,useIsStaticRenderer}from\"framer\";/**\n * Čtvercová karta pro stažení PDF\n *\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 320\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function DownloadCard(props){const{variant=\"desktop\"}=props;const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"PDF n\\xe1hled\"},title,description,pdfUrl,backgroundColor,borderColor,titleFont,descFont,iconColor,style}=props;const isStatic=useIsStaticRenderer();const handleDownload=useCallback(e=>{e.stopPropagation();if(typeof window!==\"undefined\"&&pdfUrl){const link=document.createElement(\"a\");link.href=pdfUrl;link.download=\"soubor.pdf\";document.body.appendChild(link);link.click();document.body.removeChild(link);}},[pdfUrl]);const handleCardClick=useCallback(()=>{if(typeof window!==\"undefined\"&&pdfUrl){const link=document.createElement(\"a\");link.href=pdfUrl;link.download=\"soubor.pdf\";document.body.appendChild(link);link.click();document.body.removeChild(link);}},[pdfUrl]);const isMobile=variant===\"mobile\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:\"100%\",background:backgroundColor,border:`1px solid ${borderColor}`,borderRadius:16,boxShadow:RenderTarget.current()===RenderTarget.preview?\"0 2px 12px rgba(0,0,0,0.08)\":\"none\",display:\"flex\",flexDirection:isMobile?\"column\":\"row\",alignItems:isMobile?\"center\":\"stretch\",cursor:pdfUrl?\"pointer\":\"default\",overflow:\"hidden\",transition:\"box-shadow 0.2s, transform 0.2s\",position:\"relative\",padding:isMobile?12:0},tabIndex:0,role:\"button\",\"aria-label\":title,onClick:isStatic?undefined:handleCardClick,onKeyDown:isStatic?undefined:e=>{if(e.key===\"Enter\"||e.key===\" \")handleCardClick();},children:[/*#__PURE__*/_jsx(\"div\",{style:{flex:isMobile?undefined:\"0 0 40%\",width:isMobile?\"100%\":undefined,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:20},children:/*#__PURE__*/_jsx(\"div\",{style:{width:isMobile?\"80%\":\"100%\",aspectRatio:595/841,background:props.imageBgColor,borderRadius:8,boxShadow:\"0 2px 8px rgba(0,0,0,0.04)\",overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"fill\"}})})}),/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",justifyContent:isMobile?\"flex-start\":\"center\",alignItems:isMobile?\"center\":\"flex-start\",padding:isMobile?0:18,position:\"relative\",width:isMobile?\"100%\":undefined},children:[/*#__PURE__*/_jsx(\"div\",{style:{...titleFont,marginBottom:isMobile?8:12,color:titleFont?.color||\"#222\",fontWeight:500,textAlign:isMobile?\"center\":\"left\",fontSize:isMobile?18:titleFont?.fontSize},children:title}),/*#__PURE__*/_jsx(\"div\",{style:{...descFont,color:descFont?.color||\"#666\",opacity:.8,textAlign:isMobile?\"center\":\"left\",fontSize:isMobile?13:descFont?.fontSize},children:description}),/*#__PURE__*/_jsxs(\"button\",{onClick:isStatic?undefined:handleDownload,style:{position:isMobile?\"static\":\"absolute\",right:isMobile?undefined:16,bottom:isMobile?undefined:16,marginTop:isMobile?18:0,background:\"none\",border:\"none\",padding:0,cursor:\"pointer\",outline:\"none\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"transform 0.15s\",alignSelf:isMobile?\"center\":undefined,gap:8},tabIndex:-1,\"aria-label\":\"St\\xe1hnout PDF\",children:[/*#__PURE__*/_jsxs(\"svg\",{width:isMobile?32:28,height:isMobile?32:28,viewBox:\"0 0 24 24\",fill:\"none\",stroke:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"7 10 12 15 17 10\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"12\",y1:\"15\",x2:\"12\",y2:\"3\"})]}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:isMobile?16:15,color:iconColor,fontWeight:500},children:\"St\\xe1hnout\"})]})]})]});}addPropertyControls(DownloadCard,{variant:{type:ControlType.Enum,title:\"Varianta\",options:[\"desktop\",\"mobile\"],optionTitles:[\"Desktop\",\"Mobiln\\xed\"],defaultValue:\"desktop\",displaySegmentedControl:true},image:{type:ControlType.ResponsiveImage,title:\"Obr\\xe1zek PDF\"},title:{type:ControlType.String,title:\"Titulek\",defaultValue:\"Form\\xe1ty, typy a kan\\xe1ly\"},description:{type:ControlType.String,title:\"Popis\",defaultValue:\"Najděte tu nej\\xfačinnějš\\xed kombinaci pro svou obsahovou strategii.\",displayTextArea:true},pdfUrl:{type:ControlType.Link,title:\"PDF odkaz\",defaultValue:\"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\"},backgroundColor:{type:ControlType.Color,title:\"Pozad\\xed\",defaultValue:\"#FAF8F4\"},borderColor:{type:ControlType.Color,title:\"R\\xe1meček\",defaultValue:\"#E5E2DB\"},iconColor:{type:ControlType.Color,title:\"Barva ikony\",defaultValue:\"#222\"},titleFont:{type:ControlType.Font,title:\"Font titulku\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},descFont:{type:ControlType.Font,title:\"Font popisu\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},imageBgColor:{type:ControlType.Color,title:\"Pozad\\xed obr\\xe1zku\",defaultValue:\"#F5F5F5\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DownloadCard\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"320\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"320\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DownloadCard.map"],"mappings":"8MASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,UAAQ,WAAW,EAAW,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,aAAgB,CAAC,QAAM,cAAY,SAAO,kBAAgB,cAAY,YAAU,WAAS,YAAU,SAAO,EAAY,EAAS,GAAqB,CAAO,EAAeA,EAAY,GAAG,CAAqB,GAApB,EAAE,iBAAiB,CAAW,IAAS,QAAa,EAAO,CAAC,IAAM,EAAK,SAAS,cAAc,IAAI,CAAC,EAAK,KAAK,EAAO,EAAK,SAAS,aAAa,SAAS,KAAK,YAAY,EAAK,CAAC,EAAK,OAAO,CAAC,SAAS,KAAK,YAAY,EAAK,GAAI,CAAC,EAAO,CAAC,CAAO,EAAgBA,MAAgB,CAAC,GAAU,IAAS,QAAa,EAAO,CAAC,IAAM,EAAK,SAAS,cAAc,IAAI,CAAC,EAAK,KAAK,EAAO,EAAK,SAAS,aAAa,SAAS,KAAK,YAAY,EAAK,CAAC,EAAK,OAAO,CAAC,SAAS,KAAK,YAAY,EAAK,GAAI,CAAC,EAAO,CAAC,CAAO,EAAS,IAAU,SAAS,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,WAAW,EAAgB,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