import{d as l,r,a as i,u as n,b as f}from"../index.js";const v=l("settings",()=>{const e=r({}),s=r(!1),a=r(!1);async function c(){s.value=!0;try{e.value=await i("settings")}catch(t){n().error(t.message)}finally{s.value=!1}}async function u(t){a.value=!0;try{e.value=await i("settings",{method:"PUT",body:t}),n().success(f("Settings saved","pressio-crm"))}catch(o){throw n().error(o.message),o}finally{a.value=!1}}return{data:e,loading:s,saving:a,fetch:c,save:u}});export{v as u};
