import{X as e,bt as t,vt as n}from"./BT3KAag_.js";import{t as r}from"./9bCTHkeS.js";function i(){let i=t(!1),a=t(`fab`),o=t(!1);async function s(){try{let e=await r(`/api/preferences/settings`);n(i,!!e.hide_home_starters),n(a,e.agent_presentation===`rail`?`rail`:`fab`,!0)}catch{}finally{n(o,!0)}}async function c(t){let a=e(i);n(i,t,!0);try{await r(`/api/preferences/settings`,{method:`PATCH`,body:JSON.stringify({hide_home_starters:t})})}catch(e){throw n(i,a,!0),e}}async function l(t){let i=e(a);n(a,t,!0);try{await r(`/api/preferences/settings`,{method:`PATCH`,body:JSON.stringify({agent_presentation:t})})}catch(e){throw n(a,i,!0),e}}return{get hideHomeStarters(){return e(i)},get agentPresentation(){return e(a)},get loaded(){return e(o)},load:s,setHideHomeStarters:c,setAgentPresentation:l}}var a=i();export{a as t};