declare const logoutService: {
    /**
     * Tear down the active chat session end-to-end:
     *  1. Fire UI-side events (notifications, push, redux slices).
     *  2. The redux dispatch of `chat/logout` triggers
     *     `logoutMiddleware`, which emits `ethora-xmpp-logout` on
     *     `DeviceEventEmitter`. `XmppProvider` listens for that event,
     *     disconnects the XMPP transport, clears the global client
     *     singleton, and awaits `clearPersistedState()` to wipe the
     *     two persisted slice keys.
     *  3. We additionally clear:
     *     - the 60s in-memory REST `/chats/my` cache (stale rooms
     *       leak across user-switch within the cache window otherwise),
     *     - leftover AsyncStorage keys the slices don't touch
     *       (pending QR join target, push subscription set),
     *     - the persistence keys directly (belt-and-suspenders against
     *       the persistence middleware's 200ms debounce silently losing
     *       the post-logout write if the app is killed mid-flush).
     *
     * Returns a Promise so callers can sequence a navigation / restart
     * AFTER all the disk work has actually landed.
     */
    performLogout: () => Promise<void>;
};
/**
 * Hook that returns an awaitable logout function.
 *
 * ```tsx
 * const logout = useLogout();
 * await logout();
 * navigation.replace('SignIn'); // disk is provably clean here
 * ```
 *
 * The returned function resolves AFTER all teardown work has landed:
 * XMPP disconnect, redux reset, persisted slices wiped, stray
 * AsyncStorage keys removed, REST cache cleared. It never rejects —
 * any internal failure is logged via console.warn so a fire-and-forget
 * `logout()` call (no `await`) still won't crash the host.
 *
 * Why awaitable: the persistence middleware debounces writes by 200ms,
 * and the chat-slice `logout` reducer removes ETHORA_USER fire-and-
 * forget. If the host navigated / re-mounted `<Chat>` immediately
 * after a non-awaited call, the next bootstrap could occasionally
 * read stale persisted state ("old chats reappear"). Awaiting the
 * returned promise eliminates that race entirely.
 */
export declare const useLogout: () => (() => Promise<void>);
export { logoutService };
//# sourceMappingURL=useLogout.d.ts.map