import{a7 as p,cB as h,cV as m}from"./index-BKr2rJhV.js";import{b as $}from"./index-B5BaAmTQ.js";const f=(t,e,r)=>{const n=t.modelServerInferencePath;if(t.modelServer===$.VLLM){const s=e.startsWith("/")?e:`/${e}`;return`${n}${s}`}if(!t.modelName){const s=e.startsWith("/")?e:`/${e}`;return`${n}${s}`}return`${n}:${e}`},d=(t,e)=>`${t.hopsworksInferencePath}:${e}/test`,y=(t,e,r)=>{const n=f(t,e);return`/v1/${r}/${t.name}${n}`},l=p.injectEndpoints({endpoints:t=>({runTestDeployment:t.mutation({async queryFn({host:e,deployment:r,verb:n,content:s,projectName:o,method:a},i,I,g){const u=new h("",e),c=o?y(r,n,o):d(r,n);return await u.rtkQuery({url:c,data:s,headers:{"Content-Type":"application/json"},method:a??m.post},i,{skipError:!0})}}),getInferenceEndpoints:t.query({query:()=>({url:"serving/endpoints"})})})}),{useRunTestDeploymentMutation:E,useGetInferenceEndpointsQuery:Q}=l;export{E as a,y as g,Q as u};
