import { photosApi } from '$lib/api'; import { auth } from './auth.svelte'; class TrashStore { count = $state(0); async load() { if (!auth.isAuthenticated) { this.count = 0; return; } try { this.count = (await photosApi.trashCount()).count; } catch { /* ignore */ } } reset() { this.count = 0; } } export const trash = new TrashStore();