import{r as e}from"./apiClient-JXzuem8t.js";import{t}from"./apiEndpoints-DV7ai_kG.js";var n={list:n=>e.get(t.ORGANIZATIONS.LIST,{params:n}),get:n=>e.get(t.ORGANIZATIONS.DETAIL(n)),create:n=>e.post(t.ORGANIZATIONS.CREATE,n),update:(n,r)=>{if(r instanceof FormData)return e.patch(t.ORGANIZATIONS.UPDATE(n),r);if(r.logo instanceof File){let i=new FormData;return Object.entries(r).forEach(([e,t])=>{t!=null&&i.append(e,t)}),e.patch(t.ORGANIZATIONS.UPDATE(n),i)}return e.patch(t.ORGANIZATIONS.UPDATE(n),r)},delete:n=>e.delete(t.ORGANIZATIONS.DELETE(n)),getDepartments:n=>e.get(t.ORGANIZATIONS.DEPARTMENTS(n)),getStatistics:n=>e.get(t.ORGANIZATIONS.STATISTICS(n)),toggleActive:(n,r)=>e.patch(t.ORGANIZATIONS.UPDATE(n),{is_active:r})};export{n as t};