import{c as e,d as t,it as n,p as r,rt as i}from"./button-cHQg_W3T.js";var a=i(()=>{let[i,a]=n({model:`-`,android:`-`,kernel:`-`,selinux:`-`}),[o,s]=n(t),[c,l]=n({type:null}),[u,d]=n({kernel:`-`,selinux:`-`,mountBase:`-`,activeMounts:[]}),[f,p]=n([]),[m,h]=n(!1),g=null,_=!1;async function v(){return g||(h(!0),g=(async()=>{try{let[t,n,r,i]=await Promise.all([e.getDeviceStatus(),e.getVersion(),e.getStorageUsage(),e.getSystemInfo()]);a(t),s(n),l(r),d(i),p(i.activeMounts||[]),_=!0}catch(e){console.error(`Failed to load system status`,e),r.showToast(r.L.status?.loadError||`Failed to load system status`,`error`)}finally{h(!1),g=null}})(),g)}function y(){return _?Promise.resolve():v()}return{get device(){return i()},get version(){return o()},get storage(){return c()},get systemInfo(){return u()},get activePartitions(){return f()},get loading(){return m()},ensureStatusLoaded:y,loadStatus:v}});export{a as t};