import { EventEmitter, OnDestroy, TemplateRef } from '@angular/core';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import { IManagedObjectBinary } from '@c8y/client';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { AlertService, FilesService, IFetchWithProgress, GainsightService } from '@c8y/ngx-components';
import * as i0 from "@angular/core";
/**
 * A component which shows a button that opens a modal with the preview of a binary managed object.
 * This component requires CSP 'blob:' rule for img-src and media-src to be set.
 *
 * ```html
 * <c8y-file-preview [mo]="managedObject">
 *     <button customButton>Preview</button>
 * </c8y-file-preview>
 * ```
 * If no custom button provided, the component will use the default search icon button instead.
 *
 */
export declare class FilePreviewComponent implements OnDestroy {
    private downloadEmitter;
    modalRef: BsModalRef;
    private modalService;
    private sanitizer;
    private filesService;
    private alertService;
    private gainsightService;
    set _mo(mo: IManagedObjectBinary);
    mo: IManagedObjectBinary;
    contentType: 'image' | 'video' | 'text' | 'json' | 'unsupported';
    progress: IFetchWithProgress;
    dataUrl: string;
    safeDataUrl: SafeUrl;
    BUFFERING_STATUS_TEXT: "{{speed}}/s - {{bufferedBytes}} of {{totalBytes}} buffered ({{percentage}}%)";
    private destroy$;
    constructor(downloadEmitter: EventEmitter<string>, modalRef: BsModalRef, modalService: BsModalService, sanitizer: DomSanitizer, filesService: FilesService, alertService: AlertService, gainsightService: GainsightService);
    ngOnDestroy(): void;
    openModal(template: TemplateRef<any>): Promise<void>;
    private removeDownloadedFile;
    private setContentType;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilePreviewComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FilePreviewComponent, "c8y-file-preview", never, { "_mo": { "alias": "mo"; "required": false; }; }, {}, never, ["[customButton]"], false, never>;
}
//# sourceMappingURL=file-preview.component.d.ts.map