import{o as t}from"./rolldown-runtime-iuO8RvI4.js";import{Dd as o,Hl as e,Ll as s}from"./shared-0-C4kdVF7Y.js";import{Mi as r,ki as n}from"./vendor-frame-CwiylG4Y.js";import{Pf as a,cu as i}from"./shared-1-3-6x7RKF.js";var u=t(r()),m=n(),c="cowork_upgrade_prompt_shown";function l(){const t=o(),r=e(),{account:n}=s(),{mutate:l}=i(),f=!0===n?.settings?.cowork_download_intent,[d,p]=(0,u.useState)(!1);(0,u.useEffect)(()=>{if(!t||r||!f)return;if(sessionStorage.getItem(c))return;const o=setTimeout(()=>{p(!0),sessionStorage.setItem(c,"true"),l({cowork_download_intent:null})},2e3);return()=>clearTimeout(o)},[t,r,f,l]);const w=(0,u.useCallback)(()=>{p(!1)},[]);return d?(0,m.jsx)(a,{isOpen:d,onDismiss:w,variant:"agent"}):null}export{l as CoworkDownloadIntentModal};