import { HttpEvent } from '@angular/common/http';
import { Observable, UnaryFunction, MonoTypeOperatorFunction } from 'rxjs';
import * as i0 from "@angular/core";
export declare class EuiFileUploadUtilsService {
    private httpClient;
    /**
     * @description
     * Method that will format data in `FormData` and send them to backend.
     *
     * @example
     * Call the method and log the response in the console.
     *
     * ```
     * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(
     *     this.euiFileUploadUtilsService.uploadProgress((progress) => {
     *         console.log(progress);
     *     }),
     *     this.euiFileUploadUtilsService.toResponseBody(),
     * ).subscribe((response) => {
     *      console.log(response);
     * });
     * ```
     *
     * @param data Data to send to backend
     * @param APIEndPoint Endpoint URL
     * @returns The backend response.
     */
    sendData(data: any, APIEndPoint: string): Observable<any>;
    /**
     * @description
     * Method that will return the upload progress.
     *
     * @example
     * Call the method and log the progress in the console.
     *
     * ```
     * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(
     *     this.euiFileUploadUtilsService.uploadProgress((progress) => {
     *         console.log(progress);
     *     }),
     *     this.euiFileUploadUtilsService.toResponseBody(),
     * ).subscribe((response) => {
     *      console.log(response);
     * });
     * ```
     *
     * @param cb A method to execute on each progress step.
     * @returns A number between 0 and 100.
     */
    uploadProgress<T>(cb: (progress: number) => void): MonoTypeOperatorFunction<HttpEvent<T>>;
    /**
     * @description
     * Method that will return only the body of the backend response.
     *
     * @example
     * Call the method and log the response in the console.
     *
     * ```
     * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(
     *     this.euiFileUploadUtilsService.uploadProgress((progress) => {
     *         console.log(progress);
     *     }),
     *     this.euiFileUploadUtilsService.toResponseBody(),
     * ).subscribe((response) => {
     *      console.log(response);
     * });
     * ```
     *
     * @returns The backend response.
     */
    toResponseBody<T>(): UnaryFunction<Observable<HttpEvent<T>>, Observable<T>>;
    /**
     * @description
     * Return the icon to be used with eui-icon-svg of the given extension or a default file icon
     *
     * @param fileExtension
     * @returns Icon name as string
     */
    getIconForExtension(fileExtension: string): string;
    /**
     * Internal method returning `FormData` object.
     *
     * @param formValue Data to send to form
     * @returns A `FormData` object
     */
    private toFormData;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiFileUploadUtilsService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<EuiFileUploadUtilsService>;
}
//# sourceMappingURL=eui-file-upload.utils.d.ts.map