import{r as o,j as s}from"./vendor-react-Dp9pL_Wn.js";import{u as r,l as e,h as n}from"./c2ee0272b-DPDuX889.js";import{p as i,q as t,w as a,x as c}from"./index-XoaBlZfC.js";import"./vendor-ant-cds-BLsR_p72.js";import"./vendor-base-ui-N1VQ4ctE.js";import"./vendor-radix-Dv3qPI0v.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-intl-D2wGIp4M.js";import"./vendor-zod-B8MhECV7.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-DGChWNxR.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-CRl6sF7K.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-growthbook-HDTqppl-.js";import"./c9a5287df-D_Z7ffFR.js";import"./c51e217b4-CQax1dv1.js";import"./c627fcdb6-1_bsVTpt.js";function m(){}const d=o.memo(({enabled:d,onDismiss:p,onAction:l})=>{const{conversation:j}=r(),u=j?.id,v=i()?"cowork":"chat",{account:b}=e(),{lastMessage:_,previousMessage:f}=t({conversationUuid:u,isStreaming:!1}),g=o.useMemo(()=>a({lastMessage:_,previousMessage:f,isFinanceUser:"Finance"===b?.settings?.work_function}),[b?.settings?.work_function,_,f]),{dismiss:k}=n(),w=o.useCallback(()=>{k("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),p()},[k,p,v]),x=o.useCallback(()=>{k("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),l()},[k,l,v]);return d?s.jsx(c,{triggerType:g??"upload",surface:v,onShown:m,onDismiss:w,onAction:x}):null});export{d as C4ExcelUpsellChatBanner};
