import{j as o,r}from"./vendor-react-Dp9pL_Wn.js";import{u as e}from"./vendor-intl-D2wGIp4M.js";import{y as t,z as s,A as n}from"./index-DhMXk6CR.js";import{r as i}from"./c6eedc03a-CsEFTfjy.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-zod-0xcuG3aM.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-ant-cds-bBedrtIN.js";import"./vendor-base-ui-DNypCIlh.js";import"./vendor-radix-Ch96tRrt.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-query-BwvgHhJ1.js";import"./vendor-zustand-BeF8W8xk.js";import"./caf7c7e06-DJYXCm3T.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-icons-CokWnmlw.js";import"./vendor-motion-EDlUw66k.js";import"./c5669b8e4-DFSq88jr.js";import"./vendor-luxon-CZxT8ieM.js";import"./c5f4e1303-CiyIFgnl.js";import"./cbaad2c48-DaP34LG2.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-zod-v3-CZy0YPWu.js";function a(){const{servers:o}=i(),e=n(),t=r.useMemo(()=>{const r=new Map;for(const t of[...e,...o])r.set(t.name,t.slug??t.uuid);return r},[o,e]);return r.useCallback(o=>t.get(o)??null,[t])}const c=r.memo(function({label:n}){const i=e(),c=t(),m=a(),d=r.useCallback(()=>c({section:"connectors",slug:m(n)}),[n,m,c]);return o.jsx("button",{type:"button",onClick:d,"aria-label":i.formatMessage({defaultMessage:"Browse connectors for {connector}",id:"PiQz+EUnsh"},{connector:n}),className:"cursor-pointer hover:opacity-80 transition-opacity",children:o.jsx(s,{label:n})})});function m({label:r,selected:n}){const i=e(),c=t(),m=a();return o.jsx("button",{type:"button",onMouseDown:o=>o.preventDefault(),onClick:()=>c({section:"connectors",slug:m(r)}),"aria-label":i.formatMessage({defaultMessage:"Browse connectors for {connector}",id:"PiQz+EUnsh"},{connector:r}),className:"cursor-pointer hover:opacity-80 transition-opacity",children:o.jsx(s,{label:r,selected:n})})}export{m as ConnectorMentionNodeViewBody,c as TranscriptConnectorMentionPill};
