import{o}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as e,ki as r}from"./vendor-frame-CwiylG4Y.js";import{rn as s}from"./vendor-all-2-BJdkbLSj.js";import{Pd as t}from"./shared-4-6CEyRAHb.js";import{Ia as n}from"./shared-5-UQAFGbWu.js";import{V as a,wt as c}from"./shared-10-DEXHYEQf.js";var l=o(e()),i=r();function u(){const{servers:o}=t(),e=a(),r=(0,l.useMemo)(()=>{const r=new Map;for(const s of[...e,...o])r.set(s.name,s.slug??s.uuid);return r},[o,e]);return(0,l.useCallback)(o=>r.get(o)??null,[r])}var m=(0,l.memo)(function({label:o}){const e=s(),r=n(),t=u();return(0,i.jsx)("button",{type:"button",onClick:(0,l.useCallback)(()=>r({section:"connectors",slug:t(o)}),[o,t,r]),"aria-label":e.formatMessage({defaultMessage:"Browse connectors for {connector}",id:"PiQz+EUnsh"},{connector:o}),className:"cursor-pointer hover:opacity-80 transition-opacity",children:(0,i.jsx)(c,{label:o})})});function f({label:o,selected:e}){const r=s(),t=n(),a=u();return(0,i.jsx)("button",{type:"button",onMouseDown:o=>o.preventDefault(),onClick:()=>t({section:"connectors",slug:a(o)}),"aria-label":r.formatMessage({defaultMessage:"Browse connectors for {connector}",id:"PiQz+EUnsh"},{connector:o}),className:"cursor-pointer hover:opacity-80 transition-opacity",children:(0,i.jsx)(c,{label:o,selected:e})})}export{f as ConnectorMentionNodeViewBody,m as TranscriptConnectorMentionPill};