import{w as e}from"./index-bel1r0Sr.js";var t=async(t,n,r)=>(r=await(await e(`/api/reports`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})).json(),t.length&&await e(`/api/permissions/bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t.map(e=>({deviceId:e,reportId:r.id})))}),n.length&&await e(`/api/permissions/bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n.map(e=>({groupId:e,reportId:r.id})))}),null);export{t};