{"version":3,"file":"Share_article.BOSd3xZX.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/23KJ3DAf3sk5n16nxGIR/CFGm9VPfZhdKKwiP0PXR/Share_article.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function Share_article(props){const[currentUrl,setCurrentUrl]=useState(false);const{tint}=props;let link=\"\";useEffect(()=>{setCurrentUrl(window.location.href);},[]);switch(props.provider){case\"LinkedIn\":link=\"https://www.linkedin.com/shareArticle?mini=true&url=\"+currentUrl;break;case\"Facebook\":link=\"https://www.facebook.com/sharer/sharer.php?u=\"+currentUrl;break;case\"Twitter\":link=\"https://twitter.com/intent/tweet?text=\"+currentUrl;break;}if(currentUrl){return /*#__PURE__*/_jsx(\"a\",{href:link,target:\"_blank\",style:buttonStyle,children:props.children});}return /*#__PURE__*/_jsx(\"div\",{style:buttonStyle});}addPropertyControls(Share_article,{children:{type:ControlType.ComponentInstance},provider:{type:ControlType.Enum,defaultValue:\"LinkedIn\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",options:[\"LinkedIn\",\"Twitter\",\"Facebook\"],optionTitles:[\"LinkedIn\",\"Twitter\",\"Facebook\"]}});// Styles are written in object syntax\n// https://react.dev/reference/react-dom/components/common#usage\nconst buttonStyle={width:40,height:40,backgroundColor:\"#ffffff\",//border: \"1px solid rgba(208, 213, 221, 1)\",\ndisplay:\"flex\",justifyContent:\"center\",alignItems:\"center\",borderRadius:100};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Share_article\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Share_article.map"],"mappings":"2LAEqI,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAM,CAAC,QAAM,EAAU,EAAK,GAA4D,OAAzD,MAAc,CAAC,EAAc,EAAO,SAAS,KAAK,EAAG,EAAE,CAAC,CAAQ,EAAM,SAAb,CAAuB,IAAI,WAAW,EAAK,uDAAuD,EAAW,MAAM,IAAI,WAAW,EAAK,gDAAgD,EAAW,MAAM,IAAI,UAAU,EAAK,yCAAyC,EAAW,MAA2H,OAAjH,EAAgC,EAAK,IAAI,CAAC,KAAK,EAAK,OAAO,SAAS,MAAM,EAAY,SAAS,EAAM,SAAS,CAAC,CAAsB,EAAK,MAAM,CAAC,MAAM,EAAY,CAAC,wBAA3sB,IAAsC,IAAoD,CAAmnB,EAAoB,EAAc,CAAC,SAAS,CAAC,KAAK,EAAY,kBAAkB,CAAC,SAAS,CAAC,KAAK,EAAY,KAAK,aAAa,WAAW,wBAAwB,GAAK,0BAA0B,WAAW,QAAQ,CAAC,WAAW,UAAU,WAAW,CAAC,aAAa,CAAC,WAAW,UAAU,WAAW,CAAC,CAAC,CAAC,CAExhC,EAAY,CAAC,MAAM,GAAG,OAAO,GAAG,gBAAgB,UACtD,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,aAAa,IAAI"}