import type { RootState } from "app/store";

export const selectLoginApiCallStatus = (
  state: RootState
): "fulfilled" | "rejected" | "none" | "pending" =>
  state.login.apps.LoginApiCallStatus;

export const selectLocalStorageKeyforIdToken = (
  state: RootState
): string | null => state.login.apps.localStorageKeyforIdToken;

export const selectUserName = (state: RootState) =>
  state.header.domain.getUserInfo?.userName ?? "";

export const selectIsUserNameEmpty = (state: RootState) =>
  state.header.domain.getUserInfo === undefined;
