import{r as e,j as s}from"./vendor-react-Dp9pL_Wn.js";import{E as o,F as i}from"./c2ee0272b-DPDuX889.js";import{M as n}from"./vendor-intl-D2wGIp4M.js";import{R as r,T as t,U as d,H as a}from"./index-XoaBlZfC.js";import"./vendor-ant-cds-BLsR_p72.js";import"./vendor-base-ui-N1VQ4ctE.js";import"./vendor-radix-Dv3qPI0v.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-zod-B8MhECV7.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-DGChWNxR.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-CRl6sF7K.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-growthbook-HDTqppl-.js";import"./c9a5287df-D_Z7ffFR.js";import"./c51e217b4-CQax1dv1.js";import"./c627fcdb6-1_bsVTpt.js";const l={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:i,onClick:p,onVisibilityChange:u}){const c=r(),[j,v]=e.useState(null);e.useEffect(()=>{t().then(e=>v(e))},[]);const[f,h]=e.useState(!1),{downloadAndOpenModal:g,modal:k}=d("desktop_upsell_nudge",{onClose:()=>{h(!1),p()}}),x=e.useCallback(e=>{e.preventDefault(),g(j),h(!0)},[j,g]);return c?s.jsxs(s.Fragment,{children:[!f&&s.jsx(a,{actionHref:"#",openInNewTab:!1,imageUrl:"/images/spotlights/desktop-upsell-nudge.svg",onDismiss:i,onClick:x,analyticsEvents:l,variant:"always-visible",onVisibilityChange:u,body:o()?s.jsx(n,{defaultMessage:"Type, speak, or screenshot with Claude from anywhere on your Mac.",id:"t9IS+AYBWW"}):s.jsx(n,{defaultMessage:"Chat with Claude from anywhere on your computer",id:"17AbdHyLfC"}),title:s.jsx(n,{defaultMessage:"Claude for Desktop is here",id:"d8ef3pvwg/"}),actionText:s.jsx(m,{children:s.jsx(n,{defaultMessage:"Download",id:"5q3qC0sC3r"})})}),k]}):null}function m({children:e}){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(i,{size:12}),e]})}const u=e.memo(({onDismiss:e,onAction:o})=>s.jsx(p,{onDismiss:e,onClick:o}));export{u as DesktopUpsellNudge};
