import { useContext } from "react";
import { AccountsContext } from "../providers/accounts-provider.js";
export function useAccountManager(require = true) {
    const manager = useContext(AccountsContext);
    if (!manager && require)
        throw new Error("Missing AccountsProvider");
    return manager;
}
