import * as i2$1 from '@acorex/platform/common';
import { AXPErrorHandler } from '@acorex/platform/common';
import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { AuthConfig } from 'angular-oauth2-oidc';
import * as i1$1 from '@angular/common';
import * as i1 from '@angular/router';
import * as i2 from '@acorex/platform/layout/components';
import { AXPEntityModel, AXMEntityCrudServiceImpl } from '@acorex/platform/layout/entity';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';

declare class AXMAuthErrorHandler implements AXPErrorHandler {
    private router;
    private layoutService;
    handleError(error: Error, next: (error: any) => void): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMAuthErrorHandler, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMAuthErrorHandler>;
}

declare enum AXMAuthenticationTypes {
    UsernamePassword = 0,
    UsernameEmailPassword = 1,
    EmailPassword = 2,
    MobilePassword = 3,
    EmailCode = 4,
    MobileCode = 5
}
declare const AXM_AUTH_CONFIG_TOKEN: InjectionToken<AXMAuthConfigs>;
interface AXMExternalProviderConfig {
    providerName: string;
}
interface AXMAuthConfigs {
    type: AXMAuthenticationTypes;
    authConfig?: AuthConfig;
    baseUrl?: string;
    logoutUrl?: string;
    end_url?: string;
    signup?: {
        enable: boolean;
        url?: string;
    };
    externalProviders?: {
        [provider: string]: AXMExternalProviderConfig;
    };
    signinPage?: {
        description: string;
        slogan: string;
    };
    defaultStrategyName?: string;
    idleTimeout?: number;
}
declare const AXMDefaultAuthConfigs: AXMAuthConfigs;
declare function configAuthModule(config?: Partial<AXMAuthConfigs>): AXMAuthConfigs;

declare class AXPAccountModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXPAccountModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXPAccountModule, never, [typeof i1.RouterModule, typeof i2.AXPComponentSlotModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXPAccountModule>;
}

declare class AXMAuthModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMAuthModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMAuthModule, never, [typeof i1$1.CommonModule, typeof i2$1.AXPCommonModule, typeof i1.RouterModule, typeof AXPAccountModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMAuthModule>;
}

declare enum AXMSessionStatusTypes {
    revoked = "revoked",
    expired = "expired",
    active = "active"
}
interface AXMSecurityManagementDeviceSessionsEntityModel extends AXPEntityModel<string> {
    clientName: string;
    ipAddress: string;
    userAgent: string;
    authorizationId: string;
    status: string;
    userId: string;
    user: {
        id: string;
        name: string;
    };
    applicationId: string;
    application: {
        id: string;
        name: string;
    };
    tenantId: string;
    tenant: {
        id: string;
        name: string;
    };
    isActiveSession: boolean;
    deviceName: string;
    operatingSystem: string;
    browser: string;
    location: string;
    lastLoginDate: Date;
}

declare class AXPIdleService {
    private configs;
    private idle$;
    private timeoutDuration;
    private userActivity$;
    private idleSubscription;
    constructor();
    get idleState$(): Observable<void>;
    private setupActivityListeners;
    startWatching(): void;
    resetTimer(): void;
    stopWatching(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXPIdleService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXPIdleService>;
}

declare abstract class AXMDeviceSessionsService extends AXMEntityCrudServiceImpl<string, AXMSecurityManagementDeviceSessionsEntityModel> {
    abstract terminate(id: string): Promise<boolean>;
    abstract terminateAllCurrentUserSessions(): Promise<boolean>;
}
declare class AXMDeviceSessionsServiceImpl extends AXMDeviceSessionsService {
    private http;
    private configs;
    constructor(http: HttpClient);
    terminate(id: string): Promise<boolean>;
    terminateAllCurrentUserSessions(): Promise<boolean>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDeviceSessionsServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDeviceSessionsServiceImpl>;
}

export { AXMAuthErrorHandler, AXMAuthModule, AXMAuthenticationTypes, AXMDefaultAuthConfigs, AXMDeviceSessionsService, AXMDeviceSessionsServiceImpl, AXMSessionStatusTypes, AXM_AUTH_CONFIG_TOKEN, AXPIdleService, configAuthModule };
export type { AXMAuthConfigs, AXMExternalProviderConfig, AXMSecurityManagementDeviceSessionsEntityModel };
