import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as s,ki as o}from"./vendor-frame-CwiylG4Y.js";import{Fg as a,X_ as i}from"./shared-1-3-6x7RKF.js";import{io as n,uo as l,xo as t}from"./shared-6-Cf_fMhRZ.js";import{nn as d}from"./vendor-all-2-BJdkbLSj.js";import{X as r}from"./index-C9LAU4f-.js";var u=e(s()),c=o(),m={shown:"claudeai.desktop_upsell_nudge.shown",dismissed:"claudeai.desktop_upsell_nudge.dismissed",clicked:"claudeai.desktop_upsell_nudge.clicked",hovered:"claudeai.desktop_upsell_nudge.hovered"};function p({onDismiss:e,onClick:s,onVisibilityChange:o}){const a=n(),[p,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{t().then(e=>h(e))},[]);const[g,j]=(0,u.useState)(!1),{downloadAndOpenModal:k,modal:x}=l("desktop_upsell_nudge",{onClose:()=>{j(!1),s()}}),C=(0,u.useCallback)(e=>{e.preventDefault(),k(p),j(!0)},[p,k]);return a?(0,c.jsxs)(c.Fragment,{children:[!g&&(0,c.jsx)(r,{actionHref:"#",openInNewTab:!1,imageUrl:"/images/spotlights/desktop-upsell-nudge.svg",onDismiss:e,onClick:C,analyticsEvents:m,variant:"always-visible",onVisibilityChange:o,body:i()?(0,c.jsx)(d,{defaultMessage:"Type, speak, or screenshot with Claude from anywhere on your Mac.",id:"t9IS+AYBWW"}):(0,c.jsx)(d,{defaultMessage:"Chat with Claude from anywhere on your computer",id:"17AbdHyLfC"}),title:(0,c.jsx)(d,{defaultMessage:"Claude for Desktop is here",id:"d8ef3pvwg/"}),actionText:(0,c.jsx)(f,{children:(0,c.jsx)(d,{defaultMessage:"Download",id:"5q3qC0sC3r"})})}),x]}):null}function f({children:e}){return(0,c.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,c.jsx)(a,{size:12}),e]})}var h=(0,u.memo)(({onDismiss:e,onAction:s})=>(0,c.jsx)(p,{onDismiss:e,onClick:s}));export{h as DesktopUpsellNudge};