import{H as s,J as r,aA as u,F as o,ao as l,G as p}from"./index-D7KLAbvI.js";import{aM as c,aL as f}from"./@ui-core-DKdciH1Z.js";function a({params:e}){return["runs",e]}async function i({params:e}){const n=s(r.runs.all+"?"+u(e)),t=await o(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&l(),!t.ok)throw new p({message:"Error while fetching pipeline runs",status:t.status,statusText:t.statusText});return t.json()}function m(e,n){return c({queryKey:a(e),queryFn:()=>i(e),...n})}function P(e){return f({queryKey:[...a(e),"infinite"],queryFn:({pageParam:n})=>i({params:{...e.params,page:n}}),getNextPageParam:n=>n.index<n.total_pages?n.index+1:null,initialPageParam:1})}export{P as a,m as u};
