import{r as o,j as s}from"./vendor-react-AXa6hZO5.js";import{a as r,g as e,h as n,k as i,d as t,l as a}from"./index-C_tZnXTW.js";import"./vendor-infra-CFC-WJ8N.js";import"./vendor-zod-CMvj0_Fd.js";import"./cec18ad9a-DiLjrOUd.js";import"./vendor-radix-glKlawmm.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-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 d=()=>{},m=o.memo(({enabled:m,onDismiss:p,onAction:c})=>{const{conversation:j}=r(),l=j?.id,v=e()?"cowork":"chat",{lastMessage:u,previousMessage:b}=n({conversationUuid:l,isStreaming:!1}),g=o.useMemo(()=>i({lastMessage:u,previousMessage:b}),[u,b]),{dismiss:h}=t(),f=o.useCallback(()=>{h("c4word_chat_banner_upsell"),p()},[h,p]),w=o.useCallback(()=>{h("c4word_chat_banner_upsell"),c()},[h,c]);return m?s.jsx(a,{triggerType:g??"upload",surface:v,onShown:d,onDismiss:f,onAction:w}):null});m.displayName="C4WordUpsellChatBanner";export{m as C4WordUpsellChatBanner};
