{"version":3,"file":"DownloadButton_1.D8XL4HS4.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/k0VhVw2QjoyTTVUWJIK6/yl0wkrDJE7yLj7Xz5flr/DownloadButton_1.js"],"sourcesContent":["// Download button component with file upload, icon, title, description, and hover state animation\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function DownloadButton(props){const{file=\"https://framerusercontent.com/assets/8w3IUatLX9a5JVJ6XPCVuHi94.mp3\",icon={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Download icon\"},iconSize=24,title=\"Download Company Profile\",description=\"Download our company profile for an overview of our services, structure, and operational capabilities across security, construction, and waste.\",backgroundColor=\"#4A5568\",textColor=\"#FFFFFF\",arrowIconColor=\"#FFFFFF\",arrowBackgroundColor=\"#3B82F6\",componentRadius=16,arrowRadius=8,titleFont,descriptionFont,hoverBackgroundColor=\"#3B82F6\",hoverTextColor=\"#FFFFFF\",hoverArrowIconColor=\"#FFFFFF\",hoverArrowBackgroundColor=\"#2563EB\",style}=props;const[isHovered,setIsHovered]=useState(false);const handleDownload=()=>{if(typeof window!==\"undefined\"&&file){window.open(file,\"_blank\");}};const showDescription=description.trim().length>0;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius:componentRadius,cursor:\"pointer\"},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),onClick:handleDownload,children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:backgroundColor,transition:\"background-color 0.3s ease\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:isHovered?\"100%\":\"0%\",backgroundColor:hoverBackgroundColor,opacity:isHovered?1:0,transition:\"height 0.3s ease, opacity 0.3s ease\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",padding:\"32px\",paddingRight:\"80px\",display:\"flex\",flexDirection:\"column\",gap:showDescription?\"16px\":\"0px\",zIndex:1},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"12px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:iconSize,height:iconSize,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0},children:/*#__PURE__*/_jsx(\"img\",{src:icon.src,alt:icon.alt||\"Download icon\",style:{width:\"100%\",height:\"100%\",objectFit:\"contain\"}})}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,color:isHovered?hoverTextColor:textColor,transition:\"color 0.3s ease\",...titleFont},children:title})]}),showDescription&&/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:isHovered?hoverTextColor:textColor,transition:\"color 0.3s ease\",...descriptionFont},children:description})]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:\"32px\",right:\"32px\",width:\"48px\",height:\"48px\",backgroundColor:isHovered?hoverArrowBackgroundColor:arrowBackgroundColor,borderRadius:arrowRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"background-color 0.3s ease\",zIndex:2},children:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M7 17L17 7M17 7H7M17 7V17\",stroke:isHovered?hoverArrowIconColor:arrowIconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{transition:\"stroke 0.3s ease\"}})})})]});}addPropertyControls(DownloadButton,{file:{type:ControlType.File,title:\"File\",allowedFileTypes:[\"pdf\",\"doc\",\"docx\",\"txt\",\"zip\",\"jpg\",\"png\"]},icon:{type:ControlType.ResponsiveImage,title:\"Icon\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:24,min:12,max:64,step:1,unit:\"px\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Download Company Profile\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"Download our company profile for an overview of our services, structure, and operational capabilities across security, construction, and waste.\",displayTextArea:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#4A5568\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},arrowIconColor:{type:ControlType.Color,title:\"Arrow Icon Color\",defaultValue:\"#FFFFFF\"},arrowBackgroundColor:{type:ControlType.Color,title:\"Arrow Background\",defaultValue:\"#3B82F6\"},componentRadius:{type:ControlType.Number,title:\"Component Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},arrowRadius:{type:ControlType.Number,title:\"Arrow Radius\",defaultValue:8,min:0,max:24,step:1,unit:\"px\"},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},descriptionFont:{type:ControlType.Font,title:\"Description Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#3B82F6\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#FFFFFF\"},hoverArrowIconColor:{type:ControlType.Color,title:\"Hover Arrow Icon\",defaultValue:\"#FFFFFF\"},hoverArrowBackgroundColor:{type:ControlType.Color,title:\"Hover Arrow BG\",defaultValue:\"#2563EB\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DownloadButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DownloadButton_1.map"],"mappings":"uMAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,qEAAqE,OAAK,CAAC,IAAI,sEAAsE,IAAI,eAAe,EAAE,WAAS,GAAG,QAAM,2BAA2B,cAAY,kJAAkJ,kBAAgB,UAAU,YAAU,UAAU,iBAAe,UAAU,uBAAqB,UAAU,kBAAgB,GAAG,cAAY,EAAE,YAAU,kBAAgB,uBAAqB,UAAU,iBAAe,UAAU,sBAAoB,UAAU,4BAA0B,UAAU,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,MAAmB,CAAW,IAAS,QAAa,GAAM,EAAO,KAAK,EAAK,QAAQ,CAAG,EAAQ,EAAgB,EAAY,KAAK,CAAC,CAAC,OAAO,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,SAAS,aAAa,EAAgB,OAAO,SAAS,EAAE,iBAAiBC,MAAoB,EAAa,EAAI,CAAC,EAAE,iBAAiBA,MAAoB,EAAa,EAAK,CAAC,EAAE,QAAQ,EAAe,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAuB,kBAAgB,WAAW,4BAA4B,CAAC,CAAC,EAAe,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,EAAU,OAAO,KAAK,gBAAgB,EAAqB,QAAQ,KAAc,WAAW,qCAAqC,CAAC,CAAC,EAAe,EAAM,MAAM,CAAC,MAAM,CAA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