import { Type } from '@angular/core';
import { Maybe, StringErrorCode } from '@dereekb/util';
import * as i0 from "@angular/core";
export declare const DEFAULT_ERROR_WIDGET_CODE = "DEFAULT_ERROR_WIDGET";
export declare const UNKNOWN_ERROR_WIDGET_CODE = "UNKNOWN_ERROR_WIDGET";
export interface DbxErrorWidgetEntry {
    /**
     * Error code to respond to.
     */
    readonly code: StringErrorCode;
    /**
     * Error widget component class to use.
     *
     * @deprecated use `widgetComponentClass` instead.
     */
    readonly componentClass?: Maybe<Type<unknown>>;
    /**
     * In-line error widget component class to use.
     *
     * This changes how it appears in dbx-error.
     *
     * If not provided, dbx-error will display the default output.
     */
    readonly errorComponentClass?: Maybe<Type<unknown>>;
    /**
     * Custom popup error widget component class to use.
     *
     * This changes how it appears in the dbx-error-widget-view.
     *
     * If not provided, the widget will display the default entry.
     */
    readonly widgetComponentClass?: Maybe<Type<unknown>>;
}
export type DbxErrorWidgetEntryWithPopupComponentClass = Omit<DbxErrorWidgetEntry, 'popupComponentClass'> & {
    popupComponentClass: Type<unknown>;
};
/**
 * Service used to register error widgets.
 *
 * It has two default widgets:
 *
 * - default: used in cases where an error has been registered by its error code
 * - unknown: used in cases where an error has an error code that has not been registered
 *
 * By default the DbxErrorDefaultErrorWidgetComponent is registered to both the default and unknown error entries.
 */
export declare class DbxErrorWidgetService {
    private readonly _entries;
    constructor();
    registerDefaultEntry(entry: Omit<DbxErrorWidgetEntry, 'errorComponentClass' | 'code'>): boolean;
    registerUnknownEntry(entry: Omit<DbxErrorWidgetEntry, 'errorComponentClass' | 'code'>): boolean;
    register(entry: DbxErrorWidgetEntry, override?: boolean): boolean;
    getErrorWidgetIdentifiers(): StringErrorCode[];
    getDefaultErrorWidgetEntry(): Maybe<DbxErrorWidgetEntry>;
    getUnknownErrorWidgetEntry(): Maybe<DbxErrorWidgetEntry>;
    getErrorWidgetEntry(code: StringErrorCode): Maybe<DbxErrorWidgetEntry>;
    getErrorWidgetEntries(codes: Iterable<StringErrorCode>): DbxErrorWidgetEntry[];
    static ɵfac: i0.ɵɵFactoryDeclaration<DbxErrorWidgetService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<DbxErrorWidgetService>;
}
