import{r as e,j as s}from"./vendor-react-Dp9pL_Wn.js";import{ah as a,as as o,at as d,P as i}from"./c6eedc03a-CsEFTfjy.js";import{H as n}from"./c60f5ad19-R8w-svgU.js";import{u as r}from"./vendor-intl-D2wGIp4M.js";import{Q as t,aI as l,aJ as c,R as m,T as p,H as u}from"./index-CBEPphRm.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"./c32c0d97f-BRKlKuDE.js";import"./caf7c7e06-DJYXCm3T.js";import"./c5669b8e4-DFSq88jr.js";import"./c5f4e1303-CiyIFgnl.js";import"./cbaad2c48-DaP34LG2.js";const x=s.jsx("div",{className:"absolute inset-0 flex items-center justify-center overflow-hidden rounded-[6px] bg-[#F6F5EF] text-[#141413]",children:s.jsx(i,{asset:n,size:"sm"})}),g={both:null,code:s.jsxs("div",{"aria-hidden":!0,className:"absolute inset-0 overflow-hidden rounded-[6px] bg-[#F6F5EF]",children:[s.jsx("img",{src:"/images/clawd/persona/Clawd-Magnifier.gif",alt:"",className:"absolute right-[6px] top-[16px] z-0 w-[62px] max-w-none [image-rendering:pixelated]"}),s.jsxs("div",{className:"absolute inset-x-[12px] top-[52px] z-10 h-full rounded-t-lg border-[0.5px] border-[#E8E6DC] bg-white px-3 pt-2 shadow-[0_4px_24px_rgba(0,0,0,0.06)]",children:[s.jsxs("div",{className:"flex gap-[4px]",children:[s.jsx("span",{className:"size-[6px] rounded-full bg-[#ED6A5E]"}),s.jsx("span",{className:"size-[6px] rounded-full bg-[#F5BE4F]"}),s.jsx("span",{className:"size-[6px] rounded-full bg-[#61C454]"})]}),s.jsx("p",{className:"mt-[9px] font-mono text-[10px] text-[#D97757]",children:"* Contemplating..."})]})]}),cowork:s.jsxs("div",{"aria-hidden":!0,className:"absolute inset-0 overflow-hidden rounded-[6px] bg-[#F6F5EF]",children:[s.jsx("img",{src:"/images/cowork/work_priorities.svg",alt:"",className:"absolute left-[10px] top-[4px] w-[84px]"}),s.jsxs("div",{className:"absolute inset-x-[20px] top-[42px] z-10 rounded-lg border-[0.5px] border-[#E8E6DC] bg-white px-2.5 py-2 shadow-[0_4px_24px_rgba(0,0,0,0.08)]",children:[s.jsx("p",{className:"text-[10px] leading-snug text-[#141413]",children:"Collect updates and send a weekly summary"}),s.jsx("p",{className:"mt-[2px] text-[9.5px] text-[#91908A]",children:"Fridays at 5:00 PM"})]})]})},_={shown:"claudeai.gilded_compass_end_user_nudge.shown",dismissed:"claudeai.gilded_compass_end_user_nudge.dismissed",clicked:"claudeai.gilded_compass_end_user_nudge.clicked"},j={both:"6889gw",code:"688w2k",cowork:"jk7x9o"},b={both:"m65quy",code:"m66dgm",cowork:"1wntcs6"},v=e.memo(({enabled:i,onDismiss:n,onAction:v})=>{const w=r(),h=t(),f=a("gilded_compass_end_user_nudge",null,l),k=f?.admin_nudged_cutoff,y=!!f?.all_eligible_nudge_enabled,N=o("gilded_compass_main"),{data:F}=c(h&&(!!k||y)&&N),[E,z]=e.useState(null);e.useEffect(()=>{m().then(e=>z(e))},[]);const[D,C]=e.useState(!1),{downloadAndOpenModal:A,modal:P}=p("gilded_compass_end_user_nudge",{onClose:()=>{C(!1),v()}}),H=e.useCallback(e=>{e.preventDefault(),A(E),C(!0)},[E,A]),M=!!F?.admin_nudged_at&&!!k&&Date.parse(F.admin_nudged_at)>=Date.parse(k),T=i&&h&&N&&(M||y)&&!!F&&"eligible"===F.status&&(F.allows_claude_code||F.allows_cowork),q=e.useRef(null);T&&null===q.current&&(q.current={reason:M?"admin_invite":"all_eligible",variant:F.allows_claude_code&&F.allows_cowork?"both":F.allows_claude_code?"code":"cowork"});const I=q.current?.reason??"all_eligible",R=q.current?.variant??"cowork",S=F?.end_date?w.formatDate(F.end_date,{month:"long",day:"numeric",timeZone:"America/Los_Angeles"}):null;return s.jsxs(s.Fragment,{children:[T&&!D&&s.jsx(u,{actionHref:"#",size:"large",openInNewTab:!1,media:"admin_invite"===I?x:g[R]??void 0,imageUrl:"all_eligible"===I&&null===g[R]?"/images/spotlights/gilded-compass-try-nudge.svg":void 0,onDismiss:n,onClick:H,analyticsEvents:_,analyticsProps:{variant:R,nudge_reason:I},variant:"always-visible",title:"admin_invite"===I?s.jsx(d,{id:"1m6a9my"}):s.jsx(d,{id:b[R]}),body:s.jsxs(s.Fragment,{children:[s.jsx(d,{id:j[R]}),S&&s.jsxs(s.Fragment,{children:[" ",s.jsx(d,{id:"4f9k86",dangerouslyVisiblePublicValues:{endDate:S}})]})]}),actionText:s.jsx(d,{id:"5dr4oy"})}),P]})});v.displayName="GildedCompassEndUserNudge";export{v as GildedCompassEndUserNudge};
