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