import { Observable } from 'rxjs';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { InjectionToken } from '@angular/core';
import { NtUploadRef } from './upload-ref';
export declare class NtUploadResponse<T> {
    data: T;
    constructor(data: T);
}
export declare class NtUploadError {
    file: File | Blob;
    error: any;
    constructor(file: File | Blob, error: any);
}
export declare type NtUploadEvent<T> = NtUploadResponse<T> | NtUploadError;
export declare abstract class NtUploadHandler {
    private _http;
    constructor(_http: HttpClient);
    upload<T>(url: string, uploadRef: NtUploadRef<T>): Observable<NtUploadEvent<T>>;
    private _progress;
    protected abstract getRequestData(file: File | Blob): any;
    protected abstract getResponseData<T>(body: any): T;
    protected abstract getErrorMessage(error: HttpErrorResponse): any;
}
export declare class NtNoopUploadHandler extends NtUploadHandler {
    protected getRequestData(file: File | Blob): File | Blob;
    protected getResponseData<T>(body: any): T;
    protected getErrorMessage(error: HttpErrorResponse): string;
}
export declare const NT_UPLOAD_HANDLER: InjectionToken<NtUploadHandler>;
