import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, OnChanges, SimpleChanges, AfterViewInit } from '@angular/core';
import { Observable } from 'rxjs';
import { RedirectUriQueryParams } from './login-utils/lf-login-internal-types';
import { AbortedLoginError, AccountEndpoints, AuthorizationCredentials, LfHttpRequestHandler } from './login-utils/lf-login-types';
import { LoginMode, LoginState, LoginType, RedirectBehavior } from '@laserfiche/lf-ui-components/shared';
import { AppLocalizationService } from '@laserfiche/lf-ui-components/internal-shared';
import { LfLoginService } from './login-utils/lf-login.service';
import * as i0 from "@angular/core";
export declare class LfLoginComponent implements OnDestroy, OnInit, OnChanges, AfterViewInit {
    /** @internal */
    private ref;
    /** @internal */
    private loginService;
    /** @internal */
    private localizationService;
    mode: LoginMode;
    /**
     * @return {LfHttpRequestHandler}
     * Returns the LfHttpRequestHandler that can be used
     * to instantiate a repository API client.
     */
    get authorizationRequestHandler(): LfHttpRequestHandler;
    /** @internal */
    get isMenuMode(): boolean;
    /** @internal */
    _sign_in_text: Observable<string>;
    /** @internal */
    _sign_out_text: Observable<string>;
    /** @internal */
    _signing_in_text: Observable<string>;
    /** @internal */
    _signing_out_text: Observable<string>;
    set sign_in_text(text: string);
    set sign_out_text(text: string);
    set signing_in_text(text: string);
    set signing_out_text(text: string);
    /** @internal */
    buttonText: Observable<string>;
    set client_id(val: string);
    get client_id(): string | undefined;
    set redirect_uri(val: string);
    get redirect_uri(): string;
    set scope(val: string);
    get scope(): string | undefined;
    set redirect_behavior(val: RedirectBehavior);
    get redirect_behavior(): RedirectBehavior;
    set authorize_url_host_name(val: string);
    get authorize_url_host_name(): string;
    set login_type(val: LoginType);
    get login_type(): LoginType;
    set login_identifier(val: string);
    get login_identifier(): string;
    get authorization_credentials(): AuthorizationCredentials | undefined;
    get account_endpoints(): AccountEndpoints | undefined;
    get account_id(): string | undefined;
    get trustee_id(): string | undefined;
    get state(): LoginState;
    private set _state(value);
    loginInitiated: EventEmitter<string>;
    logoutInitiated: EventEmitter<string>;
    loginCompleted: EventEmitter<void>;
    logoutCompleted: EventEmitter<void | AbortedLoginError>;
    /**
     * Refreshes and returns the access token
     * @param initiateLoginFlowOnRefreshFailure
     * Indicates whether an attempt should be made to login using OAuth flow upon encountering an inability to refresh the access token.
     * @returns  {Promise<string | undefined>}
     */
    refreshTokenAsync: (initiateLoginFlowOnRefreshFailure: boolean) => Promise<string | undefined>;
    private loginFlowHandler;
    private startCloudLoginFlowAsync;
    initLoginFlowAsync: () => Promise<string | undefined>;
    private startSelfHostedLoginFlow;
    initSelfHostedLoginFlowAsync: (accountEndpoints: AccountEndpoints, repositoryId: string) => Promise<string | undefined>;
    handleRedirectURICallbackAsync: (url: string) => Promise<void>;
    /** @internal */
    private logoutCompleteSub?;
    /** @internal */
    private loginCompleteSub?;
    /** @internal */
    private code_challenge?;
    /** @internal */
    private hasLoginError;
    /** @internal */
    private initialized;
    /** @internal */
    constructor(
    /** @internal */
    ref: ChangeDetectorRef, 
    /** @internal */
    loginService: LfLoginService, 
    /** @internal */
    localizationService: AppLocalizationService);
    ngAfterViewInit(): Promise<void>;
    /** @internal */
    ngOnChanges(changes: SimpleChanges): Promise<void>;
    private setButtonText;
    private onStorageChanged;
    private onAccessTokenLocalStorageChange;
    /** @internal */
    get isLoggedIn(): boolean;
    /** @internal */
    get isIntermediateState(): boolean;
    /** @internal */
    ngOnInit(): Promise<void>;
    /** @internal */
    ngOnDestroy(): void;
    /** @internal */
    private initializeLoginAsync;
    /** @internal */
    parseCallbackURI(urlString: string): RedirectUriQueryParams | undefined;
    /** @internal */
    createRefreshTokenRequest(): RequestInit;
    /** @internal */
    onLoginButtonClickAsync(): Promise<void>;
    /** @internal */
    startLoginAsync(): Promise<void>;
    /** @internal */
    private startOAuthLoginFlowAsync;
    private startSelfHostedLoginFlowAsync;
    /** @internal */
    getAuthorizeUrl(): string;
    /** @internal */
    startLogout(): void;
    /** @internal */
    getFullLogoutUrl(): string | undefined;
    /** @internal */
    private handleRedirectBehavior;
    /** @internal */
    concatStrings(firstString: string | undefined, secondString: string): string;
    /** @internal */
    private beforeFetchRequestAsync;
    /** @internal */
    private afterFetchResponseAsync;
    static ɵfac: i0.ɵɵFactoryDeclaration<LfLoginComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LfLoginComponent, "lf-login-component", never, { "mode": { "alias": "mode"; "required": false; }; "authorizationRequestHandler": { "alias": "authorizationRequestHandler"; "required": false; }; "sign_in_text": { "alias": "sign_in_text"; "required": false; }; "sign_out_text": { "alias": "sign_out_text"; "required": false; }; "signing_in_text": { "alias": "signing_in_text"; "required": false; }; "signing_out_text": { "alias": "signing_out_text"; "required": false; }; "client_id": { "alias": "client_id"; "required": false; }; "redirect_uri": { "alias": "redirect_uri"; "required": false; }; "scope": { "alias": "scope"; "required": false; }; "redirect_behavior": { "alias": "redirect_behavior"; "required": false; }; "authorize_url_host_name": { "alias": "authorize_url_host_name"; "required": false; }; "login_type": { "alias": "login_type"; "required": false; }; "login_identifier": { "alias": "login_identifier"; "required": false; }; "authorization_credentials": { "alias": "authorization_credentials"; "required": false; }; "account_endpoints": { "alias": "account_endpoints"; "required": false; }; "account_id": { "alias": "account_id"; "required": false; }; "trustee_id": { "alias": "trustee_id"; "required": false; }; "state": { "alias": "state"; "required": false; }; "refreshTokenAsync": { "alias": "refreshTokenAsync"; "required": false; }; "initLoginFlowAsync": { "alias": "initLoginFlowAsync"; "required": false; }; "initSelfHostedLoginFlowAsync": { "alias": "initSelfHostedLoginFlowAsync"; "required": false; }; "handleRedirectURICallbackAsync": { "alias": "handleRedirectURICallbackAsync"; "required": false; }; }, { "loginInitiated": "loginInitiated"; "logoutInitiated": "logoutInitiated"; "loginCompleted": "loginCompleted"; "logoutCompleted": "logoutCompleted"; }, never, never, false, never>;
}
