export interface UseAddAccountReturn { addAccount: () => void; /** * Whether there is room for another account right now — a *predicate*, * derived from the map size on every render. Use it to enable/disable an * "Add account" affordance before the user commits to anything. */ canAddAccount: boolean; /** * Whether an admission was actually *refused* because the map was full — an * *event*, latched in the store until the next successful admission or any * removal. Use it to render the error after a sign-in was rejected at the * cap, including on the OAuth paths, whose entry point is synchronous and so * has no call to reject. * * The two answer different questions: `canAddAccount` is "may I offer this?", * `accountLimitReached` is "did this just fail?". */ accountLimitReached: boolean; } export default function useAddAccount(): UseAddAccountReturn;