import{r as o,j as s}from"./vendor-react-Dp9pL_Wn.js";import{u as e,h as r,c as n}from"./c6eedc03a-CsEFTfjy.js";import{m as i,n as t,t as a,v as c}from"./index-DhMXk6CR.js";import"./vendor-ant-cds-bBedrtIN.js";import"./vendor-base-ui-DNypCIlh.js";import"./vendor-radix-Ch96tRrt.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-intl-D2wGIp4M.js";import"./vendor-zod-0xcuG3aM.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-CokWnmlw.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-BwvgHhJ1.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-infra-DayZK7Ds.js";import"./caf7c7e06-DJYXCm3T.js";import"./c5669b8e4-DFSq88jr.js";import"./c5f4e1303-CiyIFgnl.js";import"./cbaad2c48-DaP34LG2.js";function m(){}const p=o.memo(({enabled:p,onDismiss:d,onAction:l})=>{const{conversation:j}=e(),u=j?.id,v=i()?"cowork":"chat",{account:_}=r(),{lastMessage:b,previousMessage:f}=t({conversationUuid:u,isStreaming:!1}),g=o.useMemo(()=>a({lastMessage:b,previousMessage:f,isFinanceUser:"Finance"===_?.settings?.work_function}),[_?.settings?.work_function,b,f]),{dismiss:k}=n(),x=o.useCallback(()=>{k("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),d()},[k,d,v]),w=o.useCallback(()=>{k("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),l()},[k,l,v]);return p?s.jsx(c,{triggerType:g??"upload",surface:v,onShown:m,onDismiss:x,onAction:w}):null});p.displayName="C4ExcelUpsellChatBanner";export{p as C4ExcelUpsellChatBanner};
