part of "account_manager.dart";

extension AccountAuthInvoker on AccountManager {
  Future<bool> _invokeLogin(GuruUser loginUser, Credential credential) async {
    return await GuruApp.instance.protocol.accountAuthDelegate?.onLogin(loginUser, credential) ??
        true;
  }

  Future<bool> _invokeLogout(GuruUser logoutUser) async {
    return await GuruApp.instance.protocol.accountAuthDelegate?.onLogout(logoutUser) ?? true;
  }

  Future<bool> _invokeAnonymousLogout(GuruUser logoutUser) async {
    return await GuruApp.instance.protocol.accountAuthDelegate?.onAnonymousLogout(logoutUser) ??
        true;
  }

  Future<bool> _invokeAnonymousLogin(GuruUser loginUser, Credential credential) async {
    return await GuruApp.instance.protocol.accountAuthDelegate?.onAnonymousLogin(loginUser, credential) ??
        true;
  }

  Future<bool> _invokeConflict() async {
    return await GuruApp.instance.protocol.accountAuthDelegate?.onConflict() ?? false;
  }
}
