import{R as n,bI as s,db as i,X as c}from"./index-Dz5JRQhj.js";const o=["can_edit","can_delete"],g=async e=>{const t=new URLSearchParams;return t.set("recursion","1"),i(t,e,o),fetch(`${n}/1.0/image-registries?${t.toString()}`).then(s).then(a=>a.metadata)},h=async(e,t)=>{const a=new URLSearchParams;return a.set("recursion","1"),i(a,t,o),fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}?${a.toString()}`).then(s).then(r=>r.metadata)},d=async(e,t)=>{const a=new URLSearchParams;return a.set("recursion","1"),i(a,t,o),fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}/images?${a.toString()}`).then(s).then(r=>r.metadata.sort(c))},p=async e=>{await fetch(`${n}/1.0/image-registries`,{method:"POST",headers:{"Content-Type":"application/json"},body:e}).then(s)},y=async(e,t)=>{await fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}).then(s)},R=async e=>{await fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}`,{method:"DELETE"}).then(s)},$=async(e,t)=>{await fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:t}).then(s)};export{d as a,h as b,p as c,R as d,g as f,y as r,$ as u};
