import{st as e}from"./index-Bo9BrBsx.js";var t=`/api/users/groups`;const n={list:async n=>(await e.get(t+`/`,{params:n})).data,get:async n=>(await e.get(`${t}/${n}`)).data,create:async n=>(await e.post(t+`/`,n)).data,update:async(n,r)=>(await e.patch(`${t}/${n}`,r)).data,delete:async n=>(await e.delete(`${t}/${n}`)).data||{},getPermissions:async()=>{let t=[],n=1,r=null,i=!0;for(;i;){let a=await e.get(`/api/usermanagement/userpermissions/`,{params:{page_size:500,page:n}});if(Array.isArray(a.data))return a.data;let o=a.data.results||[];r=typeof a.data.count==`number`?a.data.count:r,t.push(...o),i=o.length===0?!1:r===null?o.length===500:t.length<r,n+=1}return t},getAppPermissions:async()=>{let t=await e.get(`/api/users/apps/permissions/`);return Array.isArray(t.data)?t.data:[]},mini:async()=>(await e.get(`${t}/mini/`)).data};export{n as t};