import{bc as a,w as o}from"./app-BgLa5dit.js";function s(e){return e.reduce((t,i)=>(t[i.name]=i,t),{})}const m={setting(e,t,i,n){return{key:`settings:${e}:${t}`,url:`/api/domain/v3/settings/${e}?type=${t}`,normalizeOptions:{idAttribute:"name"},formatData:r=>o.first(r),success:i,error:n}},customerSettings(e,t,i){return{key:`customer:settings:${e}`,url:`/api/domain/v3/settings/${e}`,normalizeOptions:{idAttribute:"name"},formatData:s,success:t,error:i}},organisationSettings(e,t,i){return{key:"organisation:settings",url:`/api/domain/v3/settings/${e}`,normalizeOptions:{idAttribute:"name"},formatData:s,success:t,error:i}},updateSetting(e,t,i,n,r){return{key:`update:setting:${e}:${t.name}`,url:`/api/domain/v3/settings/${e}`,data:t,type:a.PUT,formatData:()=>t,normalizeOptions:{idAttribute:"name"},success:i,error:n,always:r}},updateSettings(e,t,i,n){return{key:`update:settings:${e}:bulk`,url:`/api/domain/v3/settings/${e}/bulk`,data:t,type:a.PUT,invalidationKeys:t.map(r=>`settings:${e}:${r.name}`),formatData:()=>t,normalizeOptions:{idAttribute:"name"},success:i,error:n}}};export{m as S};
//# sourceMappingURL=CReApwJh.chunk.js.map
