import{r as o,j as s}from"./vendor-react-AXa6hZO5.js";import{b as e}from"./cec18ad9a-DiLjrOUd.js";import{a as r,g as n,h as t,t as i,d as a,v as c}from"./index-C_tZnXTW.js";import"./vendor-radix-glKlawmm.js";import"./vendor-zod-CMvj0_Fd.js";import"./vendor-intl-BdADXLLt.js";import"./vendor-zustand-CcZsBpBq.js";import"./vendor-icons-Dy3Nea9p.js";import"./vendor-lodash-BKAXkXVe.js";import"./vendor-motion-0BJMgYoH.js";import"./vendor-infra-CFC-WJ8N.js";import"./vendor-router-BSYVf8By.js";import"./vendor-query-D7SPXjZv.js";import"./vendor-growthbook-XJcBFzji.js";import"./cdd5b9598-juLasKsB.js";import"./c2591c98b-9UrrTnB9.js";import"./vendor-luxon-D0OkDiyb.js";import"./c51f8bc6d-BS9P5nN1.js";import"./tree-sitter-BFuuT2ac.js";const m=()=>{},d=o.memo(({enabled:d,onDismiss:p,onAction:l})=>{const{conversation:j}=r(),u=j?.id,v=n()?"cowork":"chat",{account:_}=e(),{lastMessage:b,previousMessage:g}=t({conversationUuid:u,isStreaming:!1}),k=o.useMemo(()=>i({lastMessage:b,previousMessage:g,isFinanceUser:"Finance"===_?.settings?.work_function}),[_?.settings?.work_function,b,g]),{dismiss:w}=a(),x=o.useCallback(()=>{w("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),p()},[w,p,v]),f=o.useCallback(()=>{w("cowork"===v?"c4excel_cowork_banner_upsell":"c4excel_chat_banner_upsell"),l()},[w,l,v]);return d?s.jsx(c,{triggerType:k??"upload",surface:v,onShown:m,onDismiss:x,onAction:f}):null});d.displayName="C4ExcelUpsellChatBanner";export{d as C4ExcelUpsellChatBanner};
