import{e as l,n as c,bH as m,bI as f,s as y,aO as n}from"./index-DjCrtoJM.js";async function u(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(t){if(t instanceof m&&t.code===f.MethodNotFound)return{prompts:[]};throw t}}async function b(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function g(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>u(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],y(a)}function q(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>u(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],c(a)}export{q as a,b as g,u as l,g as u};
