{"version":3,"file":"PDFDownloadButton.CEOTAsgO.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/nvT2B7rbR7KiPNFMoiJQ/qtQoCaeDbG3jxJWKTMt0/PDFDownloadButton.js"],"sourcesContent":["// PDF Download Button - A button component that allows visitors to download a PDF file\n// Includes styling options for stroke, fill, hover states, font customization, and a PDF icon\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * PDF Download Button\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PDFDownloadButton(props){const{label=\"Download PDF\",pdfFile=\"\",backgroundColor=\"#FFFFFF\",textColor=\"#000000\",strokeColor=\"#000000\",strokeWidth=1,hoverBackgroundColor=\"#F5F5F5\",hoverTextColor=\"#000000\",borderRadius=8,showIcon=true,iconPosition=\"left\",font}=props;const[isHovered,setIsHovered]=useState(false);const handleDownload=()=>{if(typeof window!==\"undefined\"&&pdfFile){window.open(pdfFile,\"_blank\");}};const PDFIcon=()=>/*#__PURE__*/_jsxs(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",style:{flexShrink:0},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M14 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V8L14 2Z\",stroke:isHovered?hoverTextColor:textColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M14 2V8H20\",stroke:isHovered?hoverTextColor:textColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M10 13H8V17H10C10.5304 17 11.0391 16.7893 11.4142 16.4142C11.7893 16.0391 12 15.5304 12 15C12 14.4696 11.7893 13.9609 11.4142 13.5858C11.0391 13.2107 10.5304 13 10 13Z\",stroke:isHovered?hoverTextColor:textColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})]});return /*#__PURE__*/_jsxs(\"button\",{onClick:handleDownload,onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:8,padding:\"12px 24px\",backgroundColor:isHovered?hoverBackgroundColor:backgroundColor,color:isHovered?hoverTextColor:textColor,border:`${strokeWidth}px solid ${strokeColor}`,borderRadius:`${borderRadius}px`,cursor:\"pointer\",transition:\"all 0.2s ease\",outline:\"none\",flexDirection:iconPosition===\"right\"?\"row-reverse\":\"row\",width:\"max-content\",...font},\"aria-label\":label,children:[showIcon&&/*#__PURE__*/_jsx(PDFIcon,{}),/*#__PURE__*/_jsx(\"span\",{children:label})]});}addPropertyControls(PDFDownloadButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Download PDF\"},pdfFile:{type:ControlType.File,title:\"PDF File\",allowedFileTypes:[\"pdf\"]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},strokeColor:{type:ControlType.Color,title:\"Stroke Color\",defaultValue:\"#000000\"},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:1,min:0,max:10,step:1,unit:\"px\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#F5F5F5\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},showIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},iconPosition:{type:ControlType.Enum,title:\"Icon Position\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true,hidden:({showIcon})=>!showIcon},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PDFDownloadButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PDFDownloadButton.map"],"mappings":"iMAOG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,eAAe,UAAQ,GAAG,kBAAgB,UAAU,YAAU,UAAU,cAAY,UAAU,cAAY,EAAE,uBAAqB,UAAU,iBAAe,UAAU,eAAa,EAAE,WAAS,GAAK,eAAa,OAAO,QAAM,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,MAAmB,CAAW,IAAS,QAAa,GAAS,EAAO,KAAK,EAAQ,SAAS,EAAU,MAAyB,EAAM,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,MAAM,CAAC,WAAW,EAAE,CAAC,SAAS,CAAc,EAAK,OAAO,CAAC,EAAE,sPAAsP,OAAO,EAAU,EAAe,EAAU,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,CAAC,CAAc,EAAK,OAAO,CAAC,EAAE,aAAa,OAAO,EAAU,EAAe,EAAU,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,CAAC,CAAc,EAAK,OAAO,CAAC,EAAE,0KAA0K,OAAO,EAAU,EAA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