{"version":3,"file":"Share_article.2bX2-IOe.mjs","names":["useState","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","c","init_jsx_runtime","ce","init_framer_CN96F41L","addPropertyControls","ControlType","Share_article","currentUrl","setCurrentUrl","props","link","buttonStyle","init_Share_article"],"sources":["https:/framerusercontent.com/modules/5SS3xHqN2etSj4Ppa7QO/C4Z0D25YO5gUB6GjcH6Y/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;case\"WhatsApp\":link=\"https://wa.me/?text=\"+currentUrl;}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\",\"WhatsApp\"],optionTitles:[\"LinkedIn\",\"Twitter\",\"Facebook\",\"WhatsApp\"]}});// Styles are written in object syntax\n// https://react.dev/reference/react-dom/components/common#usage\nconst boxStyle={margin:25,width:125,height:125,borderRadius:0};const buttonStyle={width:45,height:45,backgroundColor:\"rgba(Transparant)\",border:\"0px solid rgba(0, 0, 0, 0\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",borderRadius:0};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Share_article\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Share_article.map"],"mappings":"A,+LAEqI,SAAwBY,EAAc,EAAM,CAAC,GAAK,CAACC,EAAWC,GAAed,EAAS,EAAK,EAAO,CAAC,QAAMe,EAAUC,EAAK,GAA4D,OAAzDR,MAAc,CAACM,EAAcZ,EAAO,SAAS,IAAI,CAAE,EAAE,CAAC,CAAC,EAASa,EAAM,SAAb,CAAuB,IAAI,WAAW,EAAK,uDAAuDF,EAAW,MAAM,IAAI,WAAW,EAAK,gDAAgDA,EAAW,MAAM,IAAI,UAAU,EAAK,yCAAyCA,EAAW,MAAM,IAAI,WAAW,EAAK,uBAAuBA,CAAW,CAAqH,OAAjHA,EAAgC,gBAAK,IAAI,CAAC,KAAKG,EAAK,OAAO,SAAS,MAAMC,EAAY,SAASF,EAAM,QAAQ,CAAC,EAAuB,gBAAK,MAAM,CAAC,MAAME,CAAW,CAAC,CAAE,C,oDAACP,EAAoBE,EAAc,CAAC,SAAS,CAAC,KAAKD,EAAY,iBAAiB,EAAE,SAAS,CAAC,KAAKA,EAAY,KAAK,aAAa,WAAW,wBAAwB,GAAK,0BAA0B,WAAW,QAAQ,CAAC,WAAW,UAAU,WAAW,UAAU,EAAE,aAAa,CAAC,WAAW,UAAU,WAAW,UAAU,CAAC,CAAC,CAAC,EAEpiC,EAAY,CAAC,MAAM,GAAG,OAAO,GAAG,gBAAgB,oBAAoB,OAAO,4BAA4B,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,aAAa,CAAC,C"}