import{v as c}from"./index-BTX30BGB.js";const h=(e,t)=>new Promise((o,r)=>{fetch(`/1.0/networks/${e}/forwards?project=${t}&recursion=1`).then(c).then(n=>o(n.metadata)).catch(r)}),i=(e,t,o)=>new Promise((r,n)=>{fetch(`/1.0/networks/${e}/forwards/${t}?project=${o}&recursion=1`).then(c).then(s=>r(s.metadata)).catch(n)}),$=(e,t,o)=>{const r=t.location?`&target=${t.location}`:"";return new Promise((n,s)=>{fetch(`/1.0/networks/${e}/forwards?project=${o}${r}`,{method:"POST",body:JSON.stringify(t)}).then(c).then(n).catch(s)})},d=(e,t,o)=>{const r=t.location?`&target=${t.location}`:"";return new Promise((n,s)=>{fetch(`/1.0/networks/${e}/forwards/${t.listen_address}?project=${o}${r}`,{method:"PUT",body:JSON.stringify(t)}).then(c).then(n).catch(s)})},w=(e,t,o)=>{const r=t.location?`&target=${t.location}`:"";return new Promise((n,s)=>{fetch(`/1.0/networks/${e.name}/forwards/${t.listen_address}?project=${o}${r}`,{method:"DELETE"}).then(c).then(n).catch(s)})};export{h as a,$ as c,w as d,i as f,d as u};
