const listeners = new Set();
/** Subscribe to "forms data changed" notifications. Returns an unsubscribe fn. */
export function onFormsChanged(listener) {
    listeners.add(listener);
    return () => {
        listeners.delete(listener);
    };
}
/** Notify all subscribers that forms/submission counts may have changed. */
export function emitFormsChanged() {
    for (const listener of listeners) {
        try {
            listener();
        }
        catch {
            // A misbehaving subscriber must not break sibling subscribers.
        }
    }
}
//# sourceMappingURL=forms-events.js.map