import{c as e,i as t,l as n,n as r,r as i}from"./use-api-BQhcC0Jo.js";const a=i({endpointKey:`ALL_WORKSPACES`,responseType:{}}),o=r({endpointKey:`WORKSPACE_USERS`,responseType:[]}),s=r({endpointKey:`WORKSPACE_GROUPS`,responseType:[]}),c=async e=>(await t(n.ALL_WORKSPACES,{method:`POST`,body:JSON.stringify(e)})).workspace,l=async(n,r)=>(await t(e.WORKSPACE_DETAIL(n),{method:`PATCH`,body:JSON.stringify(r)})).workspace,u=async n=>{await t(e.WORKSPACE_DETAIL(n),{method:`DELETE`})},d=async(e,t)=>{let[n,r]=await Promise.all([o(e,t),s(e,t)]);return{users:n.length,groups:r.length}};export{d as a,s as i,u as n,o,a as r,l as s,c as t};