import * as i0 from '@angular/core';
import { InjectionToken, Type, ModuleWithProviders, EnvironmentProviders } from '@angular/core';
import Keycloak from 'keycloak-js';
import { HttpInterceptorFn } from '@angular/common/http';

interface SdKeycloakTenantConfig {
    url: string;
    realm: string;
    clientId: string;
    secureRoutes?: string[];
}
interface ISdKeycloakConfiguration {
    loadTenantConfig: () => Promise<SdKeycloakTenantConfig>;
}
declare const SD_KEYCLOAK_CONFIGURATION: InjectionToken<ISdKeycloakConfiguration>;

declare class SdKeycloakService {
    keycloak: Keycloak;
    config: SdKeycloakTenantConfig;
    init(config: SdKeycloakTenantConfig): Promise<boolean>;
    login(): Promise<void>;
    logout(): Promise<void>;
    getToken(): string | undefined;
    getIsAuthenticated(): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<SdKeycloakService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SdKeycloakService>;
}

declare const SdKeycloakInterceptor: HttpInterceptorFn;

declare function provideSdKeycloak(options: {
    useClass?: Type<ISdKeycloakConfiguration>;
    useFactory?: (...args: any[]) => ISdKeycloakConfiguration;
    deps?: any[];
}): EnvironmentProviders;
declare class SdKeycloakModule {
    static forRoot(options: {
        useClass?: Type<ISdKeycloakConfiguration>;
        useFactory?: (...args: any[]) => ISdKeycloakConfiguration;
        deps?: any[];
    }): ModuleWithProviders<SdKeycloakModule>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SdKeycloakModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<SdKeycloakModule, never, never, never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<SdKeycloakModule>;
}

export { SD_KEYCLOAK_CONFIGURATION, SdKeycloakInterceptor, SdKeycloakModule, SdKeycloakService, provideSdKeycloak };
export type { ISdKeycloakConfiguration, SdKeycloakTenantConfig };
