import{r as s,j as e}from"./vendor--leCAzSo.js";import{b as o}from"./ca9c256b9-7brFE8T2.js";import{a,i as c,j as n,s as r,d as i,t}from"./index-DZuQva-j.js";import"./c723dd3dd-58n3MxoB.js";import"./c57c2877c-dpgWZiV5.js";import"./cb5cdda9a-CSfiLIa6.js";import"./c51e217b4-KUwQQl_W.js";import"./tree-sitter-BFuuT2ac.js";const l=()=>{},m=s.memo(({enabled:m,onDismiss:p,onAction:u})=>{const{conversation:d}=a(),_=d?.id,b=c()?"cowork":"chat",{account:j}=o(),{lastMessage:g,previousMessage:k}=n({conversationUuid:_,isStreaming:!1}),w=s.useMemo(()=>r({lastMessage:g,previousMessage:k,isFinanceUser:"Finance"===j?.settings?.work_function}),[j?.settings?.work_function,g,k]),{dismiss:x}=i(),f=s.useCallback(()=>{x("cowork"===b?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),p()},[x,p,b]),h=s.useCallback(()=>{x("cowork"===b?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),u()},[x,u,b]);return m?e.jsx(t,{triggerType:w??"upload",surface:b,onShown:l,onDismiss:f,onAction:h}):null});m.displayName="C4ExcelUpsellChatBanner";export{m as C4ExcelUpsellChatBanner};
