import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
import { DbxAvatarContext } from './avatar';
import { Maybe, WebsitePath, WebsiteUrlWithPrefix } from '@dereekb/util';
import * as i0 from "@angular/core";
/**
 * The injection configuration for a DbxAvatar component.
 *
 * Not allowed to override the injector.
 *
 * The final injector that will be passed will provide DBX_AVATAR_CONTEXT_DATA_TOKEN.
 */
export type DbxAvatarInjectionComponentConfig = Omit<DbxInjectionComponentConfig, 'injector'>;
/**
 * Function that returns a DbxInjectionComponentConfig for the given context.
 *
 * Can return null/undefined if the default avatar component should be used.
 *
 * @param context The current context input.
 */
export type DbxAvatarComponentForContextFunction = (context: DbxAvatarContext) => Maybe<DbxAvatarInjectionComponentConfig>;
/**
 * Configuration for a DbxAvatarViewService.
 */
export declare abstract class DbxAvatarViewServiceConfig {
    /**
     * The default avatar URL to use in DbxAvatarViewComponent if no other url is available
     */
    readonly defaultAvatarUrl?: Maybe<WebsitePath | WebsiteUrlWithPrefix>;
    /**
     * The default fallback icon to use when no avatar image is provided.
     */
    readonly defaultAvatarIcon?: Maybe<string>;
    /**
     * The default fallback icon to use when an avatar image is provided but fails to load.
     */
    readonly defaultAvatarErrorIcon?: Maybe<string>;
    /**
     * Overrides the default avatar component.
     */
    readonly defaultAvatarComponentConfig?: Maybe<DbxAvatarInjectionComponentConfig>;
    /**
     * Custom function that returns a DbxInjectionComponentConfig for the given context.
     */
    readonly avatarComponentForContext?: DbxAvatarComponentForContextFunction;
}
/**
 * Service for registering avatars.
 */
export declare class DbxAvatarViewService {
    private readonly _serviceConfig;
    private _defaultAvatarUrl;
    private _defaultAvatarIcon;
    private _defaultAvatarErrorIcon;
    private _defaultAvatarComponentConfig;
    private _avatarComponentForContext?;
    avatarComponentForContext(context: DbxAvatarContext): DbxAvatarInjectionComponentConfig;
    get defaultAvatarUrl(): Maybe<string>;
    get defaultAvatarIcon(): Maybe<string>;
    get defaultAvatarErrorIcon(): Maybe<string>;
    setDefaultAvatarUrl(url: Maybe<WebsitePath | WebsiteUrlWithPrefix>): void;
    setDefaultAvatarIcon(icon: Maybe<string>): void;
    setDefaultAvatarErrorIcon(icon: Maybe<string>): void;
    setDefaultAvatarComponentConfig(config: DbxAvatarInjectionComponentConfig): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<DbxAvatarViewService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<DbxAvatarViewService>;
}
