import{r as e,j as s}from"./vendor-react-AXa6hZO5.js";import{_ as o,$ as i,a0 as n,H as t,a1 as r}from"./index-C_tZnXTW.js";import{i as d}from"./cec18ad9a-DiLjrOUd.js";import{M as a}from"./vendor-intl-BdADXLLt.js";import"./vendor-infra-CFC-WJ8N.js";import"./vendor-zod-CMvj0_Fd.js";import"./vendor-router-BSYVf8By.js";import"./cdd5b9598-juLasKsB.js";import"./vendor-lodash-BKAXkXVe.js";import"./vendor-motion-0BJMgYoH.js";import"./vendor-query-D7SPXjZv.js";import"./vendor-zustand-CcZsBpBq.js";import"./vendor-growthbook-XJcBFzji.js";import"./vendor-radix-glKlawmm.js";import"./c2591c98b-9UrrTnB9.js";import"./vendor-luxon-D0OkDiyb.js";import"./c51f8bc6d-BS9P5nN1.js";import"./vendor-icons-Dy3Nea9p.js";import"./tree-sitter-BFuuT2ac.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"},p=({onDismiss:r,onClick:p,onVisibilityChange:c})=>{const u=o(),[j,v]=e.useState(null);e.useEffect(()=>{i().then(e=>v(e))},[]);const[f,g]=e.useState(!1),{downloadAndOpenModal:h,modal:k}=n("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(t,{actionHref:"#",openInNewTab:!1,imageUrl:"/images/spotlights/desktop-upsell-nudge.svg",onDismiss:r,onClick:x,analyticsEvents:l,variant:"always-visible",onVisibilityChange:c,body:d()?s.jsx(a,{defaultMessage:"Type, speak, or screenshot with Claude from anywhere on your Mac.",id:"t9IS+AYBWW"}):s.jsx(a,{defaultMessage:"Chat with Claude from anywhere on your PC",id:"Cq5BjwFvd7"}),title:s.jsx(a,{defaultMessage:"Claude for Desktop is here",id:"d8ef3pvwg/"}),actionText:s.jsx(m,{children:s.jsx(a,{defaultMessage:"Download",id:"5q3qC0sC3r"})})}),k]}):null};function m({children:e}){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(r,{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};
