import{C as o,cd as h,ce as s,bn as p}from"./index-lOezWVmi.js";const c=["can_edit","can_delete"],i=async(t,n)=>{const e=new URLSearchParams;return e.set("project",t),e.set("recursion","1"),s(e,n,c),fetch(`/1.0/network-acls?${e.toString()}`).then(o).then(a=>a.metadata)},d=async(t,n,e)=>{const a=new URLSearchParams;return a.set("project",n),a.set("recursion","1"),s(a,e,c),fetch(`/1.0/network-acls/${encodeURIComponent(t)}?${a.toString()}`).then(p).then(r=>r)},l=async(t,n)=>{const e=new URLSearchParams;return e.set("project",n),fetch(`/1.0/network-acls/${encodeURIComponent(t)}/log?${e.toString()}`).then(h).then(a=>a)},w=async(t,n)=>{const e=new URLSearchParams;e.set("project",n),await fetch(`/1.0/network-acls?${e.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(o)},S=async(t,n,e)=>{const a=new URLSearchParams;a.set("project",e),await fetch(`/1.0/network-acls/${encodeURIComponent(t)}?${a.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n})}).then(o)},f=async(t,n)=>{const e=new URLSearchParams;e.set("project",n),await fetch(`/1.0/network-acls/${encodeURIComponent(t.name)}?${e.toString()}`,{method:"PUT",body:JSON.stringify(t),headers:{"Content-Type":"application/json","If-Match":t.etag??""}}).then(o)},y=async(t,n)=>{const e=new URLSearchParams;e.set("project",n),await fetch(`/1.0/network-acls/${encodeURIComponent(t)}?${e.toString()}`,{method:"DELETE"}).then(o)};export{i as a,d as b,w as c,y as d,l as f,S as r,f as u};
