import{r as o,j as e}from"./vendor-react-AXa6hZO5.js";import{u as s}from"./c6eedc03a-C8LSdtro.js";import{a as r,k as n,l as i,v as t,d as a,w as c}from"./index-D35RxkWr.js";import"./vendor-intl-BdADXLLt.js";import"./vendor-lodash-D-zrMTUO.js";import"./vendor-zod-1gcJXWab.js";import"./vendor-zustand-CcZsBpBq.js";import"./vendor-icons-DsiQAprm.js";import"./vendor-motion-DGh7M6mr.js";import"./vendor-radix-jAWPQP1f.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-router-B4CxQ1po.js";import"./vendor-query-B8PP3rYl.js";import"./vendor-growthbook-XJcBFzji.js";import"./c365fd3fe-Dmpsm876.js";import"./c70a3d12b-BI7Bbafv.js";import"./vendor-luxon-Y8l99kBI.js";import"./tree-sitter-BFuuT2ac.js";const l=()=>{},m=o.memo(({enabled:m,onDismiss:d,onAction:p})=>{const{conversation:u}=r(),j=u?.id,v=n()?"cowork":"chat",{account:_}=s(),{lastMessage:g,previousMessage:k}=i({conversationUuid:j,isStreaming:!1}),w=o.useMemo(()=>t({lastMessage:g,previousMessage:k,isFinanceUser:"Finance"===_?.settings?.work_function}),[_?.settings?.work_function,g,k]),{dismiss:b}=a(),f=o.useCallback(()=>{b("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),d()},[b,d,v]),x=o.useCallback(()=>{b("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),p()},[b,p,v]);return m?e.jsx(c,{triggerType:w??"upload",surface:v,onShown:l,onDismiss:f,onAction:x}):null});m.displayName="C4ExcelUpsellChatBanner";export{m as C4ExcelUpsellChatBanner};
