@difizen/magent-au
Version:
23 lines (17 loc) • 505 B
text/typescript
import { inject, prop, singleton } from '@difizen/mana-app';
import { ToolManager } from './tool-manager.js';
import type { ToolModel } from './tool-model.js';
export class ToolSpace {
toolManager: ToolManager;
list: ToolModel[] = [];
loading = false;
async update() {
this.loading = true;
const options = await this.toolManager.getAll();
this.list = options.map(this.toolManager.getOrCreate);
this.loading = false;
}
}