import { CanActivateFn, GuardResult, MaybeAsync } from "@angular/router"; import { Observable } from "rxjs"; import { GuardReturnType } from "@hmcts/opal-frontend-common/guards/types"; /** * Returns a function that invokes the specified guard with a dummy route and state. * The dummy route and state are created using the provided `urlPath`. * * @param guard - The guard function to be invoked. * @param urlPath - The URL path to be used in the dummy route and state. * @returns A function that invokes the guard with the dummy route and state. */ export declare function getGuardWithDummyUrl(guard: CanActivateFn, urlPath: string): () => GuardReturnType | Promise | Observable; /** * Converts an Observable result to a Promise. * @param result The Observable result to handle. * @returns A Promise that resolves with the value of the Observable. */ export declare function handleObservableResult(result: Observable): Promise; /** * Converts any valid Angular guard result into a promise so callers can await the final value consistently. */ export declare const resolveGuardResult: (result: MaybeAsync) => Promise; /** * Runs an authentication guard function within the injection context of TestBed. * * @param authGuard - The authentication guard function to run. * @returns A promise that resolves to a boolean or UrlTree indicating whether the user is authenticated. */ export declare function runAuthGuardWithContext(authGuard: () => GuardReturnType | Promise | Observable): Promise; export declare function runHasFlowStateGuardWithContext(hasFlowStateGuard: () => GuardReturnType | Promise | Observable): Promise;