{"version":3,"file":"ShareWrapper.dbAAIOIv.mjs","names":[],"sources":["https:/framerusercontent.com/modules/nN6Ryb4yihMChxXG41mt/eoV02di2VrZqmKfQP4S6/ShareWrapper.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{cloneElement}from\"react\";export default function ShareWrapper(props){const{title,description,button,fromMeta}=props;const handleShare=()=>{if(!window)return;const shareTitle=fromMeta?document.title:title;const shareText=fromMeta?document.querySelector(`meta[name=\"description\"]`)?.content||\"\":description;console.log(shareText,shareTitle);window.navigator.share({title:shareTitle,text:shareText,url:window.location.href});};return /*#__PURE__*/_jsx(motion.div,{onClick:handleShare,children:button&&button[0]?/*#__PURE__*/cloneElement(button[0]):\"Connect button\"});}addPropertyControls(ShareWrapper,{fromMeta:{type:ControlType.Boolean,defaultValue:true},title:{type:ControlType.String,defaultValue:\"\",hidden:({fromMeta})=>fromMeta},description:{type:ControlType.String,defaultValue:\"\",hidden:({fromMeta})=>fromMeta},button:{type:ControlType.Slot,maxCount:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShareWrapper\",\"slots\":[\"button\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShareWrapper.map"],"mappings":"0OAAiK,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,cAAY,SAAO,YAAU,EAA0T,OAAoB,EAAK,EAAO,IAAI,CAAC,YAAnU,CAAC,GAAG,CAAC,EAAO,OAAO,IAAM,EAAW,EAAS,SAAS,MAAM,EAAY,EAAU,EAAS,SAAS,cAAc,0BAA0B,CAAC,EAAE,SAAS,GAAG,EAAY,QAAQ,IAAI,EAAU,CAAU,EAAE,EAAO,UAAU,MAAM,CAAC,MAAM,EAAW,KAAK,EAAU,IAAI,EAAO,SAAS,IAAI,CAAC,CAAE,EAA2D,SAAS,GAAQ,EAAO,GAAgB,EAAa,EAAO,EAAE,EAAE,gBAAgB,CAAC,CAAE,qBAAlpB,IAAoD,IAAkC,IAAgC,EAA6hB,EAAoB,EAAa,CAAC,SAAS,CAAC,KAAK,EAAY,QAAQ,aAAa,EAAI,EAAE,MAAM,CAAC,KAAK,EAAY,OAAO,aAAa,GAAG,QAAQ,CAAC,cAAY,CAAQ,EAAE,YAAY,CAAC,KAAK,EAAY,OAAO,aAAa,GAAG,QAAQ,CAAC,cAAY,CAAQ,EAAE,OAAO,CAAC,KAAK,EAAY,KAAK,SAAS,CAAC,CAAC,CAAC"}