{"version":3,"file":"componentPresets.BmModzhg.mjs","names":["useState","startTransition","__esmMin","init_ssg_sandbox_shims","te","navigator","_e","p","init_npm_react_18_3_1","window","init_framer_CN96F41L","addPropertyControls","ControlType","ShareButton","props","isHovered","setIsHovered","showFallback","setShowFallback","shareData","err","style","hoverBackgroundColor","backgroundColor","hoverTextColor","textColor","borderRadius","font","size","label","init_ShareButton","init_jsx_runtime","fonts","init_componentPresets"],"sources":["https:/framerusercontent.com/modules/TbfKNvRJois1F3keB04C/yu6BGaTARXthr5EWQB7t/ShareButton.js","https:/framerusercontent.com/modules/ShQ8DaKRDjYwX0IcF5RG/ip36tsny85fnrCUGCi4J/componentPresets.js"],"sourcesContent":["// Share Button that opens the native share sheet on mobile and desktop browsers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ShareButton(props){const{label,url,title,text,backgroundColor,textColor,hoverBackgroundColor,hoverTextColor,size,font,borderRadius,style}=props;const[isHovered,setIsHovered]=useState(false);const[showFallback,setShowFallback]=useState(false);const handleShare=async()=>{if(typeof window===\"undefined\")return;const shareData={title:title,text:text,url:url};if(navigator.share){try{await navigator.share(shareData);}catch(err){if(err.name!==\"AbortError\"){console.error(\"Error sharing:\",err);}}}else{startTransition(()=>setShowFallback(true));setTimeout(()=>{startTransition(()=>setShowFallback(false));},2e3);}};return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"max-content\"},children:[/*#__PURE__*/_jsx(\"button\",{onClick:handleShare,onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),style:{...style,position:\"relative\",backgroundColor:isHovered?hoverBackgroundColor:backgroundColor,color:isHovered?hoverTextColor:textColor,border:\"none\",borderRadius:`${borderRadius}px`,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",...font,width:size,height:size,minWidth:size,minHeight:size},children:label}),showFallback&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"calc(100% + 8px)\",left:\"50%\",transform:\"translateX(-50%)\",backgroundColor:\"#000000\",color:\"#FFFFFF\",padding:\"8px 12px\",borderRadius:6,fontSize:12,whiteSpace:\"nowrap\",zIndex:1e3,boxShadow:\"0 2px 8px rgba(0,0,0,0.15)\"},children:\"Share not supported on this browser\"})]});}addPropertyControls(ShareButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Share\"},url:{type:ControlType.String,title:\"URL\",defaultValue:typeof window!==\"undefined\"?window.location.href:\"https://framer.com\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Check this out!\"},text:{type:ControlType.String,title:\"Text\",defaultValue:\"I wanted to share this with you\",displayTextArea:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#333333\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#FFFFFF\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:80,min:40,max:200,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:50,min:0,max:200,step:1,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Semibold\",fontSize:\"14px\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShareButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShareButton.map","// Generated by Framer (c439c68)\nexport const props={w35Of8va7:{borderRadius:0,bottomLeftRadius:0,bottomRightRadius:0,boxShadow:\"\",isMixedBorderRadius:false,isRed:true,topLeftRadius:0,topRightRadius:0}};export const fonts={};\nexport const __FramerMetadata__ = {\"exports\":{\"props\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,mMAIG,SAAwBa,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,MAAI,QAAM,OAAK,kBAAgB,YAAU,uBAAqB,iBAAe,OAAK,OAAK,eAAa,SAAOC,EAAW,CAACC,EAAUC,GAAchB,EAAS,EAAK,EAAO,CAACiB,EAAaC,GAAiBlB,EAAS,EAAK,EAAkX,MAAoB,gBAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,aAAa,EAAE,SAAS,CAAc,gBAAK,SAAS,CAAC,QAAQ,SAApd,CAAC,GAAUS,IAAS,OAAY,OAAO,IAAMU,EAAU,CAAO,QAAW,OAAS,KAAG,EAAE,GAAGd,EAAU,MAAO,GAAG,CAAC,MAAMA,EAAU,MAAMc,CAAS,CAAE,OAAOC,EAAI,CAAIA,EAAI,OAAO,cAAc,QAAQ,MAAM,iBAAiBA,CAAG,CAAG,MAAOhB,MAAoBc,EAAgB,EAAI,CAAC,EAAE,eAAe,CAACd,MAAoBc,EAAgB,EAAK,CAAC,CAAE,EAAE,GAAG,CAAG,EAA6I,iBAAiBjB,MAAoBe,EAAa,EAAI,CAAC,EAAE,iBAAiBf,MAAoBe,EAAa,EAAK,CAAC,EAAE,MAAM,CAAC,GAAGK,EAAM,SAAS,WAAW,gBAAgBN,EAAUO,EAAqBC,EAAgB,MAAMR,EAAUS,EAAeC,EAAU,OAAO,OAAO,aAAa,GAAGC,EAAa,IAAI,OAAO,UAAU,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,GAAG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