import * as i0 from '@angular/core';
import { EventEmitter } from '@angular/core';
import * as i1 from '@angular/router';
import * as i2 from '@c8y/ngx-components';
import { Pagination, Row, Column, DataGridComponent, DisplayOptions, LoadMoreMode, ServerSideDataCallback, ActionControl, BulkActionControl, ModalService, AlertService, FilesService, DataSourceModifier, ServerSideDataResult, IFetchWithProgress, GainsightService, Permissions, NavigatorNodeFactory, NavigatorNode } from '@c8y/ngx-components';
import * as i3 from '@c8y/ngx-components/file-preview';
import * as _c8y_client from '@c8y/client';
import { QueriesUtil, InventoryService, InventoryBinaryService, IManagedObjectBinary } from '@c8y/client';
import { TranslateService } from '@ngx-translate/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { Subject, Observable, Subscription } from 'rxjs';

declare class FilesRepositoryService {
    private inventoryService;
    queriesUtil: QueriesUtil;
    baseQuery: {
        __has: string;
    };
    constructor(inventoryService: InventoryService);
    getPagination(): Pagination;
    hasApplicationStorageFragment(file: Row): boolean;
    getColumns(): Column[];
    /** Returns array with items id where item has not c8y_applications_storage fragment. */
    getDeletableItemsIds(selectedItemsIds: string[], dataFromDataGrid: Array<any>): string[];
    /** Returns the total number of items (with no filters based on columns setup). */
    getTotal(): Promise<number>;
    /** Returns data for current columns and pagination setup. */
    getData(columns: Column[], pagination: Pagination, searchText?: string): Promise<_c8y_client.IResultList<_c8y_client.IManagedObject>>;
    /** Returns filters for given columns and pagination setup. */
    private getFilters;
    /** Returns a query string based on columns setup. */
    private getQueryString;
    /** Returns a query object based on columns setup. */
    private getQueryObj;
    /** Extends given query with a part based on the setup of given column. */
    private addColumnQuery;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesRepositoryService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<FilesRepositoryService>;
}

declare class FilesRepositoryComponent {
    private filesRepositoryService;
    private inventoryBinaryService;
    private modalService;
    private alertService;
    private bsModalService;
    private fileService;
    private translateService;
    dataGrid: DataGridComponent;
    destroy$: Subject<boolean>;
    title: string;
    managementTitle: string;
    loadMoreItemsLabel: string;
    loadingItemsLabel: string;
    isLoading: boolean;
    displayOptions: DisplayOptions;
    columns: Column[];
    pagination: Pagination;
    infiniteScroll: LoadMoreMode;
    serverSideDataCallback: ServerSideDataCallback;
    returnedDataSize: number;
    selectable: boolean;
    actionControls: ActionControl[];
    bulkActionControls: BulkActionControl[];
    refresh: EventEmitter<void>;
    noResultsMessage: "No results to display.";
    noDataMessage: "No files to display.";
    noResultsSubtitle: "Refine your search terms or check your spelling.";
    noDataSubtitle: "Add a new file by clicking below.";
    constructor(filesRepositoryService: FilesRepositoryService, inventoryBinaryService: InventoryBinaryService, modalService: ModalService, alertService: AlertService, bsModalService: BsModalService, fileService: FilesService, translateService: TranslateService);
    onDataSourceModifier(dataSourceModifier: DataSourceModifier): Promise<ServerSideDataResult>;
    onDeleteItem(selectedItem: Row): Promise<void>;
    onDeleteItems(selectedItemsIds: string[]): Promise<void>;
    onDownloadItem(selectedItem: IManagedObjectBinary): Promise<void>;
    openFileUploadComponent(): void;
    private deleteItemsWithConfirmation;
    private confirmItemsDeletion;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesRepositoryComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FilesRepositoryComponent, "c8y-files-repository", never, {}, {}, never, never, true, never>;
}

declare class FilesRepositoryUploadComponent {
    private alertService;
    private gainsightService;
    private filesService;
    /** Emits an event when modal is closed. `uploaded` indicates if any files were uploaded. */
    onClose: EventEmitter<{
        uploaded: boolean;
    }>;
    isLoading: boolean;
    dropFilesHereMessage: string;
    filesToUpload: File[];
    uploadProgress: IFetchWithProgress[];
    uploadProgress$: Observable<IFetchWithProgress[]>;
    uploadSubscription: Subscription;
    constructor(alertService: AlertService, gainsightService: GainsightService, filesService: FilesService);
    upload(): Promise<void>;
    onFileDroppedEvent(event: File[]): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesRepositoryUploadComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FilesRepositoryUploadComponent, "c8y-files-repository-upload", never, {}, { "onClose": "onClose"; }, never, never, true, never>;
}

declare class FilesRepositoryModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesRepositoryModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<FilesRepositoryModule, never, [typeof i1.RouterModule, typeof i2.CoreModule, typeof i2.DropAreaModule, typeof i3.FilePreviewModule, typeof FilesRepositoryComponent, typeof FilesRepositoryUploadComponent], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<FilesRepositoryModule>;
}

declare class FilesRepositoryGuard {
    private permissions;
    constructor(permissions: Permissions);
    /**
     * Checks if files repository should be active,
     * i.e. whether the current tenant can read or admin files in repository.
     *
     * @returns True, if the feature should be active.
     */
    canActivate(): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesRepositoryGuard, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<FilesRepositoryGuard>;
}

declare class FilesRepositoryNavigationFactory implements NavigatorNodeFactory {
    private filesRepositoryGuard;
    private navs;
    constructor(filesRepositoryGuard: FilesRepositoryGuard);
    get(): Promise<NavigatorNode[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesRepositoryNavigationFactory, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<FilesRepositoryNavigationFactory>;
}

export { FilesRepositoryComponent, FilesRepositoryGuard, FilesRepositoryModule, FilesRepositoryNavigationFactory, FilesRepositoryService, FilesRepositoryUploadComponent };
//# sourceMappingURL=index.d.ts.map
