import { SvelteMap } from 'svelte/reactivity'; export class Logins { all = $state(); static boot(logins) { const all = new SvelteMap(logins.map((login) => [login.id, login])); return new Logins({ all }); } constructor({ all }) { this.all = all; } add({ id, name }) { this.all.set(id, { id, name }); } }