import{o as s}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as o,ki as a}from"./vendor-frame-CwiylG4Y.js";import{Xl as r}from"./shared-1-3-6x7RKF.js";import{Ia as e,Ra 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 p=s(o()),l=a();function c(){}var u=(0,p.memo)(({enabled:s,onDismiss:o,onAction:a})=>{const{conversation:u}=n(),d=u?.id,f=t()?"cowork":"chat",{lastMessage:h,previousMessage:j}=m({conversationUuid:d,isStreaming:!1}),g=(0,p.useMemo)(()=>i({lastMessage:h,previousMessage:j}),[h,j]),{dismiss:v}=r(),b=(0,p.useCallback)(()=>{v("c4ppt_chat_banner_upsell"),o()},[v,o]),k=(0,p.useCallback)(()=>{v("c4ppt_chat_banner_upsell"),a()},[v,a]);return s?(0,l.jsx)(e,{triggerType:g??"upload",surface:f,onShown:c,onDismiss:b,onAction:k}):null});export{u as C4PptUpsellChatBanner};