use-all-agents-CFafOSN-.js 415 B

1
  1. import{H as l,I as e}from"./index-C1ixI5BX.js";import{a as n,j as r}from"./utils-nRFFHnCp.js";function a(s){const t=r(s);e.setItem(t)}function i(){const s=e.getItem(),t=n(s);return t===null?[]:t}const u=l("all_agents",{state:()=>({agents:[]}),actions:{getList(){if(this.agents.length===0){const t=i();return this.agents=t,this.agents}return this.agents},setList(s){const t=n(r(s));this.agents=t,a(t)}}});export{u};