import{l as i,w as a,n as r,m as o,o as s}from"./index-Db-xuq0b.js";const u=async n=>i.post("/organization-configurations",n,{headers:a()}),l=async(n,e)=>i.put(`/organization-configurations/${n}`,e,{headers:a()}),g=async n=>i.get(`/organization-configurations/list/${n}`,{headers:a()}),c=async n=>i.delete(`/organization-configurations/${n}`,{headers:a()}),f=async n=>i.post("/global-unit-configurations",n,{headers:a()}),y=async(n,e)=>i.put(`/global-unit-configurations/${n}`,e,{headers:a()}),C=async n=>i.get(`/global-unit-configurations/list/${n}`,{headers:a()}),d=async n=>i.delete(`/global-unit-configurations/${n}`,{headers:a()}),q=n=>r({queryKey:["listGlobalUnitConfig",n],queryFn:()=>C(n),enabled:!!n}),z=()=>{const n=o();return s({mutationFn:e=>f(e),onSuccess:()=>{n.invalidateQueries({queryKey:["listGlobalUnitConfig"]})}})},U=()=>{const n=o();return s({mutationFn:({id:e,data:t})=>y(e,t),onSuccess:(e,t)=>{n.invalidateQueries({queryKey:["globalUnitConfig",t.id]}),n.invalidateQueries({queryKey:["listGlobalUnitConfig"]})}})},G=()=>{const n=o();return s({mutationFn:e=>d(e),onSuccess:()=>{n.invalidateQueries({queryKey:["listGlobalUnitConfig"]}),n.invalidateQueries({queryKey:["globalUnitConfig"]})}})},h=n=>r({queryKey:["organizationConfig",n],queryFn:()=>g(n),enabled:!!n}),p=()=>{const n=o();return s({mutationFn:e=>u(e),onSuccess:(e,t)=>{n.invalidateQueries({queryKey:["organizationConfig",t.organizationId]})}})},K=()=>{const n=o();return s({mutationFn:({id:e,data:t})=>l(e,t),onSuccess:(e,t)=>{n.invalidateQueries({queryKey:["organizationConfig",t.data.organizationId]})}})},O=()=>{const n=o();return s({mutationFn:e=>c(e),onSuccess:()=>{n.invalidateQueries({queryKey:["organizationConfig"]})}})};export{q as a,z as b,U as c,G as d,p as e,K as f,O as g,g as h,l as i,u as j,h as u};
