{"version":3,"file":"BlogShareButtons.CAGT97gQ.mjs","names":["React.useState","React.useRef","React.useCallback"],"sources":["https:/framerusercontent.com/modules/W4YF3pG0hngp2TXmKkJ6/u27WbWuLgRKWegSN1dFr/BlogShareButtons.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const platformLabels={share:\"Share anywhere\",copy:\"Copy story link\",linkedin:\"Share on LinkedIn\",x:\"Share on X\",email:\"Share by email\"};function ShareIcon({platform,size,copied,weight}){const iconName=copied?\"check\":platform===\"share\"?\"share-network\":platform===\"copy\"?\"link-simple\":platform===\"linkedin\"?\"linkedin-logo\":platform===\"x\"?\"x-logo\":\"envelope-simple\";const weightClass=weight===\"regular\"?\"ph\":`ph-${weight}`;return /*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",width:size,height:size,flex:`0 0 ${size}px`,lineHeight:1},children:/*#__PURE__*/_jsx(\"i\",{className:`${weightClass} ph-${iconName}`,style:{display:\"block\",fontSize:size,lineHeight:1}})});}/**\n * Compact story-share buttons with one consistent visual style.\n *\n * @framerIntrinsicWidth 430\n * @framerIntrinsicHeight 170\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function BlogShareButtons(props){const{alignment=\"left\",background=\"#07101D\",padding=\"24px\",panelRadius=\"0px\",parentBorder,buttonSize=72,buttonIconSize=30,iconWeight=\"regular\",buttonGap=28,buttonBackground=\"rgba(255,255,255,0)\",buttonBorder,iconColor=\"#FFFFFF\",borderColor=\"rgba(255,255,255,0.82)\",hoverBackground=\"#E80000\",hoverIconColor=\"#FFFFFF\",hoverBorderColor=\"#E80000\",buttonRadius=10,borderWidth=1,showUniversalShare=true,showCopy=true,showLinkedIn=true,showX=true,showEmail=true,style}=props;const visibility={share:showUniversalShare,copy:showCopy,linkedin:showLinkedIn,x:showX,email:showEmail};const[hovered,setHovered]=React.useState(null);const[copiedPlatform,setCopiedPlatform]=React.useState(null);const resetTimer=React.useRef(null);React.useEffect(()=>{return()=>{if(resetTimer.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(resetTimer.current);}};},[]);const copyCurrentUrl=React.useCallback(async source=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const url=window.location.href;try{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(url);}else{throw new Error(\"Clipboard unavailable\");}}catch{const field=document.createElement(\"textarea\");field.value=url;field.style.position=\"absolute\";field.style.left=\"-9999px\";field.setAttribute(\"readonly\",\"\");document.body.appendChild(field);field.select();document.execCommand(\"copy\");document.body.removeChild(field);}setCopiedPlatform(source);if(resetTimer.current!==null)window.clearTimeout(resetTimer.current);resetTimer.current=window.setTimeout(()=>setCopiedPlatform(null),1600);},[]);const share=React.useCallback(async platform=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const url=window.location.href;const title=document.title;if(platform===\"copy\"){await copyCurrentUrl(\"copy\");return;}if(platform===\"share\"){const shareNavigator=navigator;if(shareNavigator.share){try{await shareNavigator.share({title,url});}catch(error){if(error instanceof Error&&error.name===\"AbortError\")return;await copyCurrentUrl(\"share\");}}else{await copyCurrentUrl(\"share\");}return;}if(platform===\"email\"){window.location.href=`mailto:?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(url)}`;return;}const destination=platform===\"linkedin\"?`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`:`https://x.com/intent/post?text=${encodeURIComponent(title)}&url=${encodeURIComponent(url)}`;window.open(destination,\"_blank\",\"noopener,noreferrer,width=720,height=640\");},[copyCurrentUrl]);const justifyContent=alignment===\"center\"?\"center\":alignment===\"right\"?\"flex-end\":\"flex-start\";const resolvedParentBorder=parentBorder??\"0px solid rgba(0,0,0,0)\";const parentBorderStyle=typeof resolvedParentBorder===\"string\"?{border:resolvedParentBorder}:resolvedParentBorder;const resolvedButtonBorder=buttonBorder??`${borderWidth}px solid ${borderColor}`;const buttonBorderStyle=typeof resolvedButtonBorder===\"string\"?{border:resolvedButtonBorder}:resolvedButtonBorder;const restingBorderColor=typeof resolvedButtonBorder===\"string\"?undefined:resolvedButtonBorder.borderColor??borderColor;return /*#__PURE__*/_jsxs(\"section\",{\"aria-label\":\"Share this article\",style:{...style,position:\"relative\",boxSizing:\"border-box\",width:\"100%\",height:\"auto\",display:\"flex\",flexDirection:\"column\",alignItems:alignment===\"center\"?\"center\":alignment===\"right\"?\"flex-end\":\"flex-start\",gap:0,padding,borderRadius:panelRadius,background,...parentBorderStyle,overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"link\",{rel:\"stylesheet\",type:\"text/css\",href:`https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/${iconWeight}/style.css`}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"flex\",flexWrap:\"wrap\",justifyContent,alignItems:\"center\",gap:buttonGap},children:Object.keys(visibility).map(platform=>{if(!visibility[platform])return null;const copied=copiedPlatform===platform;const active=hovered===platform||copied;const ariaLabel=copied?\"Story link copied\":platformLabels[platform];return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":ariaLabel,title:ariaLabel,onClick:()=>void share(platform),onMouseEnter:()=>setHovered(platform),onMouseLeave:()=>setHovered(null),onFocus:()=>setHovered(platform),onBlur:()=>setHovered(null),style:{appearance:\"none\",boxSizing:\"border-box\",width:buttonSize,height:buttonSize,flex:`0 0 ${buttonSize}px`,display:\"grid\",placeItems:\"center\",padding:0,...buttonBorderStyle,borderColor:active?hoverBorderColor:restingBorderColor,borderRadius:buttonRadius,background:active?hoverBackground:buttonBackground,color:active?hoverIconColor:iconColor,cursor:\"pointer\",outline:\"none\",transition:\"background-color 180ms ease, color 180ms ease, border-color 180ms ease\"},children:/*#__PURE__*/_jsx(ShareIcon,{platform:platform,size:buttonIconSize,copied:copied,weight:iconWeight})},platform);})}),/*#__PURE__*/_jsx(\"span\",{\"aria-live\":\"polite\",style:{position:\"absolute\",width:1,height:1,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0,0,0,0)\",whiteSpace:\"nowrap\",border:0},children:copiedPlatform?\"Story link copied\":\"\"})]});}addPropertyControls(BlogShareButtons,{alignment:{type:ControlType.Enum,title:\"Alignment\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#07101D\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"24px\"},panelRadius:{type:ControlType.BorderRadius,title:\"Panel Radius\",defaultValue:\"0px\"},parentBorder:{type:ControlType.Border,title:\"Parent Border\",defaultValue:{borderWidth:0,borderStyle:\"solid\",borderColor:\"rgba(0,0,0,0)\"}},buttonSize:{type:ControlType.Number,title:\"Button Size\",defaultValue:72,min:40,max:120,step:1,unit:\"px\"},buttonIconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:30,min:16,max:64,step:1,unit:\"px\"},iconWeight:{type:ControlType.Enum,title:\"Icon Weight\",options:[\"thin\",\"light\",\"regular\",\"bold\",\"fill\",\"duotone\"],optionTitles:[\"Thin\",\"Light\",\"Regular\",\"Bold\",\"Fill\",\"Duotone\"],defaultValue:\"regular\"},buttonGap:{type:ControlType.Number,title:\"Button Gap\",defaultValue:28,min:0,max:64,step:1,unit:\"px\"},buttonBackground:{type:ControlType.Color,title:\"Button BG\",defaultValue:\"rgba(255,255,255,0)\"},buttonBorder:{type:ControlType.Border,title:\"Button Border\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"rgba(255,255,255,0.82)\"}},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#FFFFFF\"},hoverBackground:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#E80000\"},hoverIconColor:{type:ControlType.Color,title:\"Hover Icon\",defaultValue:\"#FFFFFF\"},hoverBorderColor:{type:ControlType.Color,title:\"Hover Border\",defaultValue:\"#E80000\"},buttonRadius:{type:ControlType.Number,title:\"Button Radius\",defaultValue:10,min:0,max:40,step:1,unit:\"px\"},showUniversalShare:{type:ControlType.Boolean,title:\"Universal Share\",defaultValue:true},showCopy:{type:ControlType.Boolean,title:\"Copy Link\",defaultValue:true},showLinkedIn:{type:ControlType.Boolean,title:\"LinkedIn\",defaultValue:true},showX:{type:ControlType.Boolean,title:\"X\",defaultValue:true},showEmail:{type:ControlType.Boolean,title:\"Email\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogShareButtons\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"430\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"170\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogShareButtons.map"],"mappings":"kNAAiR,SAAS,EAAU,CAAC,WAAS,OAAK,SAAO,UAAQ,CAAC,IAAM,EAAS,EAAO,QAAQ,IAAW,QAAQ,gBAAgB,IAAW,OAAO,cAAc,IAAW,WAAW,gBAAgB,IAAW,IAAI,SAAS,kBAAwB,EAAY,IAAS,UAAU,KAAK,MAAM,IAAS,OAAoB,EAAK,OAAO,CAAC,cAAc,OAAO,MAAM,CAAC,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,MAAM,EAAK,OAAO,EAAK,KAAK,OAAO,EAAK,IAAI,WAAW,CAAC,EAAE,SAAsB,EAAK,IAAI,CAAC,UAAU,GAAG,EAAY,MAAM,IAAW,MAAM,CAAC,QAAQ,QAAQ,SAAS,EAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAOp2B,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,YAAU,OAAO,aAAW,UAAU,UAAQ,OAAO,cAAY,MAAM,eAAa,aAAW,GAA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