{
  "version": 3,
  "sources": ["ssg: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// \u00A9 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": "qLAOkB,SAARA,EAAmCC,EAAM,CACnD,GAAK,CAAC,eAAAC,EAAe,aAAAC,EAAa,eAAAC,EAAe,gBAAAC,EAAgB,mBAAAC,EAAmB,kBAAAC,EAAkB,eAAAC,EAAe,GAAM,QAAAC,EAAQ,UAAAC,EAAU,gBAAAC,CAAe,EAAEV,EACzJ,CAAC,YAAAW,EAAY,YAAAC,EAAY,OAAAC,EAAO,cAAAC,EAAc,cAAAC,EAAc,eAAAC,EAAe,kBAAAC,EAAkB,iBAAAC,CAAgB,EAAEjB,EAC/G,CAAC,KAAAkB,EAAK,UAAAC,EAAU,WAAAC,CAAU,EAAEZ,EAAgBa,EAAaR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AAM,aAAa,SAAS,EAAE,OAAO,CAAC,KAAKA,EAAY,YAAY,MAAM,gBAAgB,aAAa,EAAE,UAAU,gBAAgB,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,gBAAgB,iBAAiB,oBAAoB,kBAAkB,EAAE,YAAY,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,KAAKA,EAAY,YAAY,MAAM,UAAU,aAAa,GAAG,UAAU,iBAAiB,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,kBAAkB,qBAAqB,mBAAmB,EAAE,YAAY,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC",
  "names": ["SocialShareButton", "props", "containerStyle", "paddingStyle", "topLeftPadding", "topRightPadding", "bottomRightPadding", "bottomLeftPadding", "isMixedPadding", "service", "iconStyle", "backgroundColor", "borderWidth", "borderColor", "radius", "isMixedRadius", "topLeftRadius", "topRightRadius", "bottomRightRadius", "bottomLeftRadius", "size", "iconColor", "iconWeight", "borderRadius", "padding", "style", "Icon", "u1", "hP", "kW", "M2", "jj", "dh", "p", "url", "shareUrl", "navigator", "err", "window", "e", "addPropertyControls", "ControlType"]
}
