import{j as o,r}from"./vendor-react-Dp9pL_Wn.js";import{u as e}from"./vendor-intl-D2wGIp4M.js";import{A as t,B as s,F as n}from"./index-XoaBlZfC.js";import{y as i}from"./c2ee0272b-DPDuX889.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-zod-B8MhECV7.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-ant-cds-BLsR_p72.js";import"./vendor-base-ui-N1VQ4ctE.js";import"./vendor-radix-Dv3qPI0v.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-query-CRl6sF7K.js";import"./vendor-zustand-BeF8W8xk.js";import"./c9a5287df-D_Z7ffFR.js";import"./vendor-icons-DGChWNxR.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-luxon-CZxT8ieM.js";import"./c51e217b4-CQax1dv1.js";import"./c627fcdb6-1_bsVTpt.js";import"./vendor-growthbook-HDTqppl-.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(),d=a(),l=r.useCallback(()=>c({section:"connectors",slug:d(n)}),[n,d,c]);return o.jsx("button",{type:"button",onClick:l,"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 d({label:r,selected:n}){const i=e(),c=t(),d=a();return o.jsx("button",{type:"button",onMouseDown:o=>o.preventDefault(),onClick:()=>c({section:"connectors",slug:d(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{d as ConnectorMentionNodeViewBody,c as TranscriptConnectorMentionPill};
