import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import Swal, { SweetAlertOptions, SweetAlertResult } from 'sweetalert2';
import * as events from './swal-events';
import { SweetAlert2LoaderService } from './sweetalert2-loader.service';
/**
 * <swal> component. See the README.md for usage.
 *
 * It contains a bunch of @Inputs that have a perfect 1:1 mapping with SweetAlert2 options.
 * Their types are directly coming from SweetAlert2 types defintitions, meaning that ngx-sweetalert2 is tightly coupled
 * to SweetAlert2, but also is type-safe.
 *
 * (?) If you want to use an object that declares the SweetAlert2 options all at once rather than many @Inputs,
 *     take a look at [swalOptions], that lets you pass a full {@link SweetAlertOptions} object.
 *
 * (?) If you are reading the TypeScript source of this component, you may think that it's a lot of code.
 *     Be sure that a lot of this code is types and Angular boilerplate. Compiled and minified code is much smaller.
 *     If you are really concerned about performance and/or don't care about the API and its convenient integration
 *     with Angular (notably change detection and transclusion), you may totally use SweetAlert2 natively as well ;)
 *
 * /!\ Some SweetAlert options aren't @Inputs but @Outputs: onBeforeOpen, onOpen, onClose, onAfterClose and onDestroy
 *     (but without "on*" prefix to respect community standards).
 *     However, preConfirm and inputValidator are still @Inputs because there are not event handlers, there can't be
 *     multiple listeners and we need the values they can/must return.
 */
export declare class SwalComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
    private readonly sweetAlert2Loader;
    private readonly moduleLevelFireOnInit;
    private readonly moduleLevelDismissOnDestroy;
    title: SweetAlertOptions['title'];
    titleText: SweetAlertOptions['titleText'];
    text: SweetAlertOptions['text'];
    html: SweetAlertOptions['html'];
    footer: SweetAlertOptions['footer'];
    icon: SweetAlertOptions['icon'];
    iconHtml: SweetAlertOptions['iconHtml'];
    backdrop: SweetAlertOptions['backdrop'];
    toast: SweetAlertOptions['toast'];
    target: SweetAlertOptions['target'];
    input: SweetAlertOptions['input'];
    width: SweetAlertOptions['width'];
    padding: SweetAlertOptions['padding'];
    background: SweetAlertOptions['background'];
    position: SweetAlertOptions['position'];
    grow: SweetAlertOptions['grow'];
    showClass: SweetAlertOptions['showClass'];
    hideClass: SweetAlertOptions['hideClass'];
    customClass: SweetAlertOptions['customClass'];
    timer: SweetAlertOptions['timer'];
    timerProgressBar: SweetAlertOptions['timerProgressBar'];
    /** @deprecated Use showClass and hideClass instead */
    animation: SweetAlertOptions['animation'];
    heightAuto: SweetAlertOptions['heightAuto'];
    allowOutsideClick: SweetAlertOptions['allowOutsideClick'];
    allowEscapeKey: SweetAlertOptions['allowEscapeKey'];
    allowEnterKey: SweetAlertOptions['allowEnterKey'];
    stopKeydownPropagation: SweetAlertOptions['stopKeydownPropagation'];
    keydownListenerCapture: SweetAlertOptions['keydownListenerCapture'];
    showConfirmButton: SweetAlertOptions['showConfirmButton'];
    showCancelButton: SweetAlertOptions['showCancelButton'];
    confirmButtonText: SweetAlertOptions['confirmButtonText'];
    cancelButtonText: SweetAlertOptions['cancelButtonText'];
    confirmButtonColor: SweetAlertOptions['confirmButtonColor'];
    cancelButtonColor: SweetAlertOptions['cancelButtonColor'];
    confirmButtonAriaLabel: SweetAlertOptions['confirmButtonAriaLabel'];
    cancelButtonAriaLabel: SweetAlertOptions['cancelButtonAriaLabel'];
    buttonsStyling: SweetAlertOptions['buttonsStyling'];
    reverseButtons: SweetAlertOptions['reverseButtons'];
    focusConfirm: SweetAlertOptions['focusConfirm'];
    focusCancel: SweetAlertOptions['focusCancel'];
    showCloseButton: SweetAlertOptions['showCloseButton'];
    closeButtonHtml: SweetAlertOptions['closeButtonHtml'];
    closeButtonAriaLabel: SweetAlertOptions['closeButtonAriaLabel'];
    showLoaderOnConfirm: SweetAlertOptions['showLoaderOnConfirm'];
    preConfirm: SweetAlertOptions['preConfirm'];
    imageUrl: SweetAlertOptions['imageUrl'];
    imageWidth: SweetAlertOptions['imageWidth'];
    imageHeight: SweetAlertOptions['imageHeight'];
    imageAlt: SweetAlertOptions['imageAlt'];
    inputPlaceholder: SweetAlertOptions['inputPlaceholder'];
    inputValue: SweetAlertOptions['inputValue'];
    inputOptions: SweetAlertOptions['inputOptions'];
    inputAutoTrim: SweetAlertOptions['inputAutoTrim'];
    inputAttributes: SweetAlertOptions['inputAttributes'];
    inputValidator: SweetAlertOptions['inputValidator'];
    validationMessage: SweetAlertOptions['validationMessage'];
    progressSteps: SweetAlertOptions['progressSteps'];
    currentProgressStep: SweetAlertOptions['currentProgressStep'];
    progressStepsDistance: SweetAlertOptions['progressStepsDistance'];
    scrollbarPadding: SweetAlertOptions['scrollbarPadding'];
    /**
     * An object of SweetAlert2 native options, useful if:
     *  - you don't want to use the @Inputs for practical/philosophical reasons ;
     *  - there are missing @Inputs because ngx-sweetalert2 isn't up-to-date with SweetAlert2's latest changes.
     *
     * /!\ Please note that setting this property does NOT erase what has been set before unless you specify the
     *     previous properties you want to erase again.
     *     Ie. setting { title: 'Title' } and then { text: 'Text' } will give { title: 'Title', text: 'Text' }.
     *
     * /!\ Be aware that the options defined in this object will override the @Inputs of the same name.
     */
    set swalOptions(options: SweetAlertOptions);
    /**
     * Computes the options object that will get passed to SweetAlert2.
     * Only the properties that have been set at least once on this component will be returned.
     * Mostly for internal usage.
     */
    get swalOptions(): SweetAlertOptions;
    /**
     * Whether to fire the modal as soon as the <swal> component is created and initialized in the view.
     * When left undefined (default), the value will be inherited from the module configuration, which is `false`.
     *
     * Example:
     *     <swal *ngIf="error" [title]="error.title" [text]="error.text" icon="error" [swalFireOnInit]="true"></swal>
     */
    swalFireOnInit?: boolean;
    /**
     * Whether to dismiss the modal when the <swal> component is destroyed by Angular (for any reason) or not.
     * When left undefined (default), the value will be inherited from the module configuration, which is `true`.
     */
    swalDismissOnDestroy?: boolean;
    set swalVisible(visible: boolean);
    get swalVisible(): boolean;
    /**
     * Emits an event when the modal DOM element has been created.
     * Useful to perform DOM mutations before the modal is shown.
     */
    readonly beforeOpen: EventEmitter<events.BeforeOpenEvent>;
    /**
     * Emits an event when the modal is shown.
     */
    readonly open: EventEmitter<events.OpenEvent>;
    /**
     * Emits an event when the modal DOM is rendered.
     */
    readonly render: EventEmitter<events.RenderEvent>;
    /**
     * Emits an event when the modal will be closed.
     * If you just want to know when the user dismissed the modal, prefer the higher-level (cancel) output.
     */
    readonly close: EventEmitter<events.CloseEvent>;
    /**
     * Emits an event after the modal had been closed.
     * If you just want to know when the user dismissed the modal, prefer the higher-level (cancel) output.
     */
    readonly afterClose: EventEmitter<void>;
    /**
     * Emits an event after the modal had been closed.
     * The difference between {@link destroy} and {@link afterClose} is that the latter is called for user interactions
     * only (clicks), whereas {@link destroy} is always called, both for user interactions and popup being closed by
     * another popup.
     */
    readonly destroy: EventEmitter<void>;
    /**
     * Emits when the user clicks "Confirm".
     * Bears a value when using "input", resolved "preConfirm", etc.
     *
     * Example:
     *     <swal (confirm)="handleConfirm($event)"></swal>
     *
     *     public handleConfirm(email: string): void {
     *         // ... save user email
     *     }
     */
    readonly confirm: EventEmitter<any>;
    /**
     * Emits when the user clicks "Cancel", or dismisses the modal by any other allowed way.
     * By default, it will emit a string representing the reason for which the SweetAlert has been closed.
     * The reason is `undefined` when {@link dismiss} is called.
     *
     * Example:
     *     <swal (cancel)="handleCancel($event)"></swal>
     *
     *     public handleCancel(reason: DismissReason | undefined): void {
     *         // reason can be 'cancel', 'overlay', 'close', 'timer' or undefined.
     *         // ... do something
     *     }
     */
    readonly cancel: EventEmitter<Swal.DismissReason | undefined>;
    /**
     * This Set retains the properties that have been changed from @Inputs, so we can know precisely
     * what options we have to send to {@link Swal.fire}.
     */
    private readonly touchedProps;
    /**
     * A function of signature `(propName: string): void` that adds a given property name to the list of
     * touched properties, ie. {@link touchedProps}.
     */
    private readonly markTouched;
    /**
     * Is the SweetAlert2 modal represented by this component currently opened?
     */
    private isCurrentlyShown;
    constructor(sweetAlert2Loader: SweetAlert2LoaderService, moduleLevelFireOnInit: boolean, moduleLevelDismissOnDestroy: boolean);
    /**
     * Angular lifecycle hook.
     * Asks the SweetAlert2 loader service to preload the SweetAlert2 library, so it begins to be loaded only if there
     * is a <swal> component somewhere, and is probably fully loaded when the modal has to be displayed,
     * causing no delay.
     */
    ngOnInit(): void;
    /**
     * Angular lifecycle hook.
     * Fires the modal, if the component or module is configured to do so.
     */
    ngAfterViewInit(): void;
    /**
     * Angular lifecycle hook.
     * Updates the SweetAlert options, and if the modal is opened, asks SweetAlert to render it again.
     */
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Angular lifecycle hook.
     * Closes the SweetAlert when the component is destroyed.
     */
    ngOnDestroy(): void;
    /**
     * Shows the SweetAlert.
     *
     * Returns the SweetAlert2 promise for convenience and use in code behind templates.
     * Otherwise, (confirm)="myHandler($event)" and (cancel)="myHandler($event)" can be used in templates.
     */
    fire(): Promise<SweetAlertResult>;
    /**
     * Closes the modal, if opened.
     *
     * @param result The value that the modal will resolve with, triggering either (confirm) or (cancel).
     *               If the argument is not passed, (dimiss) will emit `undefined`.
     *               See {@link Swal.close}
     */
    dismiss(result?: SweetAlertResult): Promise<void>;
    /**
     * Updates SweetAlert2 options while the modal is opened, causing the modal to re-render.
     * If the modal is not opened, the component options will simply be updated and that's it.
     *
     * /!\ Please note that not all SweetAlert2 options are updatable while the modal is opened.
     *
     * @param options
     */
    update(options?: SweetAlertOptions): Promise<void>;
}
