{"version":3,"file":"Share_article.Cs1O2k1i.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/p0oab793nbkPGdRIaSQz/8L7Dg9Ss7vOmJq9f23G8/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":"+LAEqI,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,MAAM,IAAI,WAAW,EAAK,uBAAuB,EAAgI,OAAjH,EAAgC,EAAK,IAAI,CAAC,KAAK,EAAK,OAAO,SAAS,MAAM,EAAY,SAAS,EAAM,SAAS,CAAC,CAAsB,EAAK,MAAM,CAAC,MAAM,EAAY,CAAC,wBAAjwB,IAAsC,IAAoD,CAAyqB,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,WAAW,CAAC,aAAa,CAAC,WAAW,UAAU,WAAW,WAAW,CAAC,CAAC,CAAC,CAEriC,EAAY,CAAC,MAAM,GAAG,OAAO,GAAG,gBAAgB,oBAAoB,OAAO,4BAA4B,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,aAAa,EAAE"}