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

interface SdAuthOmTenantConfig {
    domain: string;
    clientId: string;
    redirectUri?: string;
    audience?: string;
    organization?: string;
    scope?: string;
    secureRoutes?: string[];
    silentRefreshRedirectUri?: string;
    refreshThresholdSeconds?: number;
    authorizeTimeoutInSeconds?: number;
}
interface ISdAuthOmConfiguration {
    loadTenantConfig: () => Promise<SdAuthOmTenantConfig>;
}
declare const SD_AUTHOM_CONFIGURATION: InjectionToken<ISdAuthOmConfiguration>;

declare class SdAuthOmService {
    private readonly platformId;
    private readonly isBrowser;
    readonly accessToken: i0.WritableSignal<string | null>;
    readonly idTokenClaims: i0.WritableSignal<Record<string, unknown> | null>;
    readonly isAuthenticated: i0.Signal<boolean>;
    config: SdAuthOmTenantConfig;
    private refreshTimer;
    getAccessToken(): string | null;
    private base64UrlEncode;
    private generateCodeVerifier;
    private generateCodeChallenge;
    private buildAuthorizeUrl;
    private getDefaultRedirectUri;
    private getSilentRedirectUri;
    private decodeJwtPayload;
    login(options?: {
        returnTo?: string;
    }): Promise<void>;
    logout(options?: {
        returnTo?: string;
    }): void;
    private exchangeCode;
    private scheduleRefresh;
    silentRefresh(): Promise<boolean>;
    handleCallback(): Promise<boolean>;
    init(config: SdAuthOmTenantConfig): Promise<boolean>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SdAuthOmService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SdAuthOmService>;
}

declare const matchGlob: (pattern: string, url: string) => boolean;
declare const SdAuthOmInterceptor: HttpInterceptorFn;

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

export { SD_AUTHOM_CONFIGURATION, SdAuthOmInterceptor, SdAuthOmModule, SdAuthOmService, matchGlob, provideSdAuthOm };
export type { ISdAuthOmConfiguration, SdAuthOmTenantConfig };
