import{q as i}from"./@tanstack-Dwlisomv.js";import{F as n,H as o,Z as p,x as l,_ as c,G as u}from"./index-CO6UN3UX.js";async function h({params:t}){const a=n(o.pipelines.all+"?"+p(t)),e=await l(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(e.status===404&&c(),!e.ok){const r=await e.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>"Error while fetching pipelines");throw new u({status:e.status,statusText:e.statusText,message:r})}return e.json()}const f={all:["pipelines"],pipelineList:t=>i({queryKey:[...f.all,t],queryFn:async()=>h({params:t})})};export{f as p};
