import{o as s}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as o,ki as r}from"./vendor-frame-CwiylG4Y.js";import{Xl as a}from"./shared-1-3-6x7RKF.js";import{Aa as e,Ma as i}from"./shared-6-Cf_fMhRZ.js";import{ks as n}from"./shared-4-6CEyRAHb.js";import{do as t}from"./shared-5-UQAFGbWu.js";import{kt as m}from"./shared-7-VxUxSmVa.js";var l=s(o()),c=r();function d(){}var p=(0,l.memo)(({enabled:s,onDismiss:o,onAction:r})=>{const{conversation:p}=n(),u=p?.id,f=t()?"cowork":"chat",{lastMessage:h,previousMessage:j}=m({conversationUuid:u,isStreaming:!1}),g=(0,l.useMemo)(()=>i({lastMessage:h,previousMessage:j}),[h,j]),{dismiss:v}=a(),M=(0,l.useCallback)(()=>{v("c4word_chat_banner_upsell"),o()},[v,o]),b=(0,l.useCallback)(()=>{v("c4word_chat_banner_upsell"),r()},[v,r]);return s?(0,c.jsx)(e,{triggerType:g??"upload",surface:f,onShown:d,onDismiss:M,onAction:b}):null});export{p as C4WordUpsellChatBanner};