/**
 * View Helper Component - supports load indicators, zero states, error states, and view-level notifications.
 *
 * @author Maryit Sanchez <msanchez@alertlogic.com>
 * @author McNielsen <knielsen@alertlogic.com>
 *
 * @copyright Alert Logic, Inc 2020
 */
import { AlDataValidationError, AlWrappedError } from '@al/core';
import { AxiosResponse } from 'axios';
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { AlNotificationPanelComponent } from '../al-notification-panel/al-notification-panel.component';
import { AlNotification, AlNotificationType, AlSCErrorDescriptor } from '../types';
import { AlToastService } from '../services/al-toast.service';
import { AlExternalContentManagerService } from '../services/al-external-content-manager.service';
import * as i0 from "@angular/core";
export declare class AlViewHelperComponent implements OnChanges {
    toastService: AlToastService;
    contentManager: AlExternalContentManagerService;
    /**
     * Indicates whether the loading animation should be displayed.
     */
    loading: boolean;
    /**
     * Indicates whether the zero state should be displayed.
     */
    empty: boolean;
    /**
     * Zero state flavor, that has different background,color or is wrapped in a card
     * default whiteBg shadowCard
     */
    zeroStateFlavor: string;
    /**
     * If set to false, no notification container will be emitted as part of the helper.
     */
    notifyPanel: boolean;
    /**
     * Indicates whether or not the error state should be displayed and, if so, if they should be
     * presented as blocking or non-blocking errors.  Different types of error objects will generate
     * various types of additional details (e.g., `Error` instances will show a stack trace when
     * "Show Details" is expanded, response descriptors will show the HTTP error and request details,
     * etc.)
     *
     * Main views should prefer to use ViewChild() to call the view helper's `setError()` method
     * directly.
     */
    error?: string | Error | AxiosResponse;
    blocking?: boolean;
    /**
     * If provided, when the view is in error state, a "Try Again" button will be shown.  Clicking this
     * will call the provided method (if it is callable) or emit a notification via the retry @Output().
     */
    retryHandler?: () => void | boolean;
    /**
     * If retryHandler === true, this event emitter will be used to communicate that the user has clicked
     * the try again button.
     * */
    retry: EventEmitter<void>;
    notifications: EventEmitter<AlNotification>;
    notificationsPanel: AlNotificationPanelComponent;
    errorTitle: string;
    errorDescription?: string;
    showError?: boolean;
    showErrorDetails?: boolean;
    errorDetails?: string;
    constructor(toastService: AlToastService, contentManager: AlExternalContentManagerService);
    ngOnChanges(changes: SimpleChanges): void;
    /**
     *  Turns the empty/zero-state mode on.
     */
    enableZeroState(): void;
    /**
     *  Turns the loading indicator on.
     */
    startLoading(): void;
    /**
     *  Turns the loading indicator off.
     */
    stopLoading(): void;
    /**
     *  Emits a notification
     */
    notify(text: string, type: AlNotificationType, autoDismiss?: number): void;
    /**
     *  Emits an info-style notification.
     */
    notifyInfo(text: string, autoDismiss?: number, flush?: boolean): void;
    /**
     *  Emits a warning notification.
     */
    notifyWarning(text: string, autoDismiss?: number, flush?: boolean): void;
    /**
     *  Emits an error notification.
     */
    notifyError(text: string, autoDismiss?: number, flush?: boolean): void;
    /**
     *  Emits an success notification.
     */
    notifySuccess(text: string, autoDismiss?: number, flush?: boolean): void;
    /**
     * Clean the notification panel
     */
    cleanNotifications(): void;
    /**
     * Emits an error notification through the view helper.
     *
     * @param error Can be any sort of error descriptor: a string, an API response, an AL-specific Error extension, a generic error, or an HTMLElement
     *          (but don't do that; it won't be pretty).  If it is null, any existing error will be cleared.
     *
     * @param blocking Indicates whether or not the error is a view-blocking error (in which case the full error trace and metadata will be exposed)
     *          or a non-blocking error.
     */
    setError(error?: any, blocking?: boolean): Promise<void>;
    getErrorDescription(error: any): Promise<string>;
    compactDataValidationError(error: AlDataValidationError): any;
    compactErrorResponse(response: AxiosResponse<any>): any;
    compactWrappedError(error: AlWrappedError): any;
    compactError(error: Error, type?: string, otherProperties?: any): any;
    consolidateWrappedErrorDescription(error: AlWrappedError | Error | AxiosResponse | string): Promise<string>;
    /**
     * @deprecated Please use `clearBlockingError()` instead.
     */
    clearError(): void;
    /**
     * Clears the error state
     */
    clearBlockingError(): void;
    /**
     * Clears the error state and calls the host-provided "try again" function
     */
    attemptReload($event: Event): void;
    protected redact(info: any): any;
    /**
     * Matches a response TODO(kjn): hook this up to the content service, when it's available, and use content from there instead of here :)
     */
    protected getResponseDescription(response: AxiosResponse<any>): Promise<string>;
    /**
     *  Finds an appropriate message in a list of error definitions
     */
    protected lookupResponseDescription(definitions: AlSCErrorDescriptor[], criteria: any): string | null;
    /**
     * Interpolates request information into an error message
     */
    protected interpolateMessageData(message: string, criteria: any): string;
    static ɵfac: i0.ɵɵFactoryDef<AlViewHelperComponent, never>;
    static ɵcmp: i0.ɵɵComponentDefWithMeta<AlViewHelperComponent, "al-view-helper", never, { "loading": "loading"; "empty": "empty"; "zeroStateFlavor": "zeroStateFlavor"; "notifyPanel": "notifyPanel"; "error": "error"; "blocking": "blocking"; "retryHandler": "retryHandler"; }, { "retry": "retry"; "notifications": "notifications"; }, never, ["[zero-state-title]", "[zero-state-description]", "[zero-state-icon]"]>;
}
