// Whether the CURRENT guest is banned.
//
// The ban is deliberately read-only (see backend `handlers/host.rs`): the guest keeps the feed
// and the released keepsake, but every write — upload, like, comment, delete — is refused with
// 403 "Du bist gesperrt.". Until this store existed the client had no idea, so all of those
// controls rendered fully enabled and the guest discovered the ban one error toast at a time,
// with nobody at the party to ask. The event-lock case has always been surfaced live for
// exactly this reason (`event-state-store`); a ban simply never was.
//
// Seeded from `/me/context` (root layout on boot, and `refreshEventState` afterwards). Reset on
// identity change so a shared device does not carry one guest's ban to the next.

import { writable } from 'svelte/store';
import { onClearAuth } from './auth';

export const isBanned = writable(false);

onClearAuth(() => isBanned.set(false));
