import{r as e,j as s}from"./vendor-react-Dp9pL_Wn.js";import{z as o,A as i}from"./c6eedc03a-CsEFTfjy.js";import{M as n}from"./vendor-intl-D2wGIp4M.js";import{Q as r,R as t,T as d,H as a}from"./index-DhMXk6CR.js";import"./vendor-ant-cds-bBedrtIN.js";import"./vendor-base-ui-DNypCIlh.js";import"./vendor-radix-Ch96tRrt.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-zod-0xcuG3aM.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-CokWnmlw.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-BwvgHhJ1.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-infra-DayZK7Ds.js";import"./caf7c7e06-DJYXCm3T.js";import"./c5669b8e4-DFSq88jr.js";import"./c5f4e1303-CiyIFgnl.js";import"./cbaad2c48-DaP34LG2.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:c}){const u=r(),[j,v]=e.useState(null);e.useEffect(()=>{t().then(e=>v(e))},[]);const[f,g]=e.useState(!1),{downloadAndOpenModal:h,modal:k}=d("desktop_upsell_nudge",{onClose:()=>{g(!1),p()}}),x=e.useCallback(e=>{e.preventDefault(),h(j),g(!0)},[j,h]);return u?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:c,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 c=e.memo(({onDismiss:e,onAction:o})=>s.jsx(p,{onDismiss:e,onClick:o}));c.displayName="DesktopUpsellNudge";export{c as DesktopUpsellNudge};
