import { FC, ReactElement, ReactNode } from "react"; import { AccountInfo } from "@azure/msal-browser"; //#region src/providers/AuthProvider/AuthProvider.d.ts type AuthState = 'loading' | 'authorized' | 'unauthorized'; interface AuthContextType { account: AccountInfo | undefined; photo: string | undefined; roles: string[] | undefined; logout: () => void; authState: AuthState; } declare const useAuth: () => AuthContextType; interface AuthProviderProps { children: ReactNode; loadingComponent?: ReactElement; unauthorizedComponent?: ReactElement; withoutLoader?: boolean; withoutBackend?: boolean; } /** * @param children - ReactNode * @param loadingComponent - Component to show while auth is loading * @param unauthorizedComponent - Component to show if user is unauthorized * @param withoutLoader - Hide loader from AuthProvider * @param withoutBackend - Will not attempt to get roles from backend */ declare const AuthProvider: FC; //#endregion export { AuthProvider, useAuth };