import{At as e,U as t,bt as n}from"./dom-CdSnbvZ6.js";import{C as r}from"./settings-BF7JcItU.js";import{p as i}from"./index-_dGt2VRU.js";var a=r(`directorAcl`,()=>{let r=i(),a=e(null),o=e(!1),s=e(null),c=t(()=>Object.values(a.value??{}).filter(e=>e?.permission===!0).length),l=t(()=>Object.values(a.value??{}).filter(e=>e?.permission!==!0).length);function u(){a.value=null,o.value=!1,s.value=null}async function d(){if(!r.isConnected)return u(),s.value=`Not connected to director`,null;o.value=!0,s.value=null;try{return a.value=await r.call(`.help full`),a.value}catch(e){return a.value=null,s.value=e.message,null}finally{o.value=!1}}async function f(){return a.value||o.value?a.value:d()}return n(()=>r.isConnected,e=>{e||u()}),{commands:a,loading:o,error:s,allowedCount:c,deniedCount:l,refresh:d,ensureLoaded:f,reset:u}});export{a as t};