{"version":3,"file":"SocialShareButtons.phabGuSw.mjs","names":["TwitterLogo","LinkedinLogo","FacebookLogo","WhatsappLogo","EnvelopeSimple","ClipboardText"],"sources":["https:/framerusercontent.com/modules/RgreFrqTHtqQfF9Bzpre/48Udf4sSSpeK3hQC0j8X/SocialShareButtons.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{FacebookLogo,TwitterLogo,LinkedinLogo,WhatsappLogo,EnvelopeSimple,ClipboardText}from\"phosphor-react\";// If you're reading this then you shouldn't be.\n// © Luca Da Corte, clicks.supply, All Rights Reserved.\n/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function SocialShareButton(props){// Destructure props\nconst{containerStyle,paddingStyle,topLeftPadding,topRightPadding,bottomRightPadding,bottomLeftPadding,isMixedPadding=false,service,iconStyle,backgroundColor}=props;// Destructure containerStyle\nconst{borderWidth,borderColor,radius,isMixedRadius,topLeftRadius,topRightRadius,bottomRightRadius,bottomLeftRadius}=containerStyle;// Destructure IconStyle\nconst{size,iconColor,iconWeight}=iconStyle;const borderRadius=isMixedRadius?`${topLeftRadius}px ${topRightRadius}px ${bottomRightRadius}px ${bottomLeftRadius}px`:`${radius}px`;const padding=isMixedPadding?`${topLeftPadding}px ${topRightPadding}px ${bottomRightPadding}px ${bottomLeftPadding}px`:`${paddingStyle}px`;const style={width:\"auto\",height:\"auto\",border:`${borderWidth}px solid ${borderColor}`,padding,borderRadius,backgroundColor,cursor:\"pointer\",transition:\"opacity 0.3s\"};let Icon;switch(service){case\"Twitter\":Icon=TwitterLogo;break;case\"LinkedIn\":Icon=LinkedinLogo;break;case\"Facebook\":Icon=FacebookLogo;break;case\"WhatsApp\":Icon=WhatsappLogo;break;case\"Email\":Icon=EnvelopeSimple;break;case\"Copy To Clipboard\":Icon=ClipboardText;break;default:Icon=FacebookLogo;break;}const handleClick=()=>{const url=\"https://www.donor.money/matching\";let shareUrl=\"\";switch(service){case\"Twitter\":shareUrl=`https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}`;break;case\"LinkedIn\":shareUrl=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`;break;case\"Facebook\":shareUrl=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;break;case\"WhatsApp\":shareUrl=`https://wa.me/?text=${encodeURIComponent(url)}`;break;case\"Email\":shareUrl=`mailto:?body=${encodeURIComponent(url)}`;break;case\"Copy To Clipboard\":navigator.clipboard.writeText(url).then(()=>{alert(\"URL copied to clipboard\");}).catch(err=>{console.error(\"Could not copy text: \",err);});return;default:shareUrl=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;break;}window.open(shareUrl,\"_blank\");};return /*#__PURE__*/_jsx(\"div\",{style:style,onClick:handleClick,onMouseEnter:e=>e.currentTarget.style.opacity=\"0.8\",onMouseLeave:e=>e.currentTarget.style.opacity=\"1\",children:/*#__PURE__*/_jsx(Icon,{size:size,color:iconColor,weight:iconWeight})});}// Default Props\nSocialShareButton.defaultProps={service:\"Facebook\",iconStyle:{size:24,iconColor:\"#fff\",iconWeight:\"regular\"},borderWidth:1,borderColor:\"#000000\",containerStyle:{backgroundColor:\"#333\",borderWidth:1,borderColor:\"#333\"}};// Property Controls\naddPropertyControls(SocialShareButton,{service:{type:ControlType.Enum,title:\"Service\",options:[\"Facebook\",\"Twitter\",\"LinkedIn\",\"WhatsApp\",\"Email\",\"Copy To Clipboard\"],optionTitles:[\"Facebook\",\"Twitter\",\"LinkedIn\",\"WhatsApp\",\"Email\",\"Copy To Clipboard\"]},iconStyle:{type:ControlType.Object,title:\"Icon\",controls:{size:{type:ControlType.Number,title:\"Icon Size\",min:10,max:100,step:1},iconColor:{type:ControlType.Color,title:\"Icon Color\"},iconWeight:{type:ControlType.Enum,title:\"Icon Weight\",options:[\"thin\",\"light\",\"regular\",\"bold\",\"fill\"],optionTitles:[\"Thin\",\"Light\",\"Regular\",\"Bold\",\"Fill\"]}}},backgroundColor:{title:\"Background Color\",type:ControlType.Color,defaultValue:\"#333\"},containerStyle:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{title:\"Border Width\",type:ControlType.Number,defaultValue:1,min:0,max:20,unit:\"px\"},borderColor:{title:\"Border Color\",type:ControlType.Color,defaultValue:\"#000000\"},radius:{type:ControlType.FusedNumber,title:\"Border Radius\",defaultValue:8,toggleKey:\"isMixedRadius\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"topLeftRadius\",\"topRightRadius\",\"bottomRightRadius\",\"bottomLeftRadius\"],valueLabels:[\"TR\",\"BR\",\"BL\",\"TL\"],min:0}}},paddingStyle:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:16,toggleKey:\"isMixedPadding\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"topLeftPadding\",\"topRightPadding\",\"bottomRightPadding\",\"bottomLeftPadding\"],valueLabels:[\"TR\",\"BR\",\"BL\",\"TL\"],min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SocialShareButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SocialShareButtons.map"],"mappings":"kYAOG,SAAwB,EAAkB,EAAM,CACnD,GAAK,CAAC,iBAAe,eAAa,iBAAe,kBAAgB,qBAAmB,oBAAkB,kBAAe,EAAM,UAAQ,YAAU,kBAAgB,CAAC,EACzJ,CAAC,cAAY,cAAY,SAAO,gBAAc,gBAAc,iBAAe,oBAAkB,mBAAiB,CAAC,EAC/G,CAAC,OAAK,YAAU,aAAW,CAAC,EAAgB,EAAa,KAAiB,EAAc,KAAK,EAAe,KAAK,EAAkB,KAAK,EAAiB,OAAO,EAAO,IAAU,EAAQ,KAA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