import type { Writable } from 'svelte/store';
import { writable } from 'svelte/store';

export const errorMessage: Writable<string | null> = (() => {
	const store: Writable<string | null> = writable(null);
	return {
		subscribe: store.subscribe,
		set: (value) => {
			if (value != null) store.set(null);
			store.set(value);
		},
		update: store.update
	};
})();
export const reportCount: Writable<number> = writable(0);
export const adminCount: Writable<number> = writable(0);
