import * as i0 from '@angular/core';
import { EventEmitter, ElementRef } from '@angular/core';
import { ApplicationService } from '@c8y/client';
import { Observable, Subject } from 'rxjs';
import * as i1 from '@c8y/ngx-components';
import * as i2 from 'ngx-bootstrap/buttons';

interface LogsJSON {
    dateFrom: string;
    dateTo: string;
    logs: string;
    truncated: boolean;
}

interface AppLogsRequestParams {
    dateFrom?: any;
    dateTo?: any;
    limit?: any;
}
declare class AppLogsService {
    private application;
    constructor(application: ApplicationService);
    getLogs$(appId: string, instanceName: string, params?: AppLogsRequestParams): Observable<LogsJSON>;
    formatDate(dateToFormat: string): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<AppLogsService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AppLogsService>;
}

declare class AppLogsAutoRefreshComponent {
    private appLogsService;
    cancel$: Subject<boolean>;
    isAutoRefreshDisabled: boolean;
    logsToOutput: LogsJSON;
    isAutoRefreshOn: boolean;
    selectedInstance: any;
    mo: any;
    set buttonsDisabled(areDisabled: boolean);
    onNewLogs: EventEmitter<LogsJSON>;
    isRealtimeEnabled: EventEmitter<boolean>;
    button: ElementRef;
    private subscription;
    constructor(appLogsService: AppLogsService);
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    private toggleState;
    private setButtonState;
    private watchForNewLogs;
    private startPolling;
    private getNewLogs;
    private getAppId;
    private getInstanceName;
    private updateLogsToOutput;
    private getEmptyLogsJson;
    static ɵfac: i0.ɵɵFactoryDeclaration<AppLogsAutoRefreshComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AppLogsAutoRefreshComponent, "c8y-app-logs-auto-refresh", never, { "selectedInstance": { "alias": "selectedInstance"; "required": false; }; "mo": { "alias": "mo"; "required": false; }; "buttonsDisabled": { "alias": "buttonsDisabled"; "required": false; }; }, { "onNewLogs": "onNewLogs"; "isRealtimeEnabled": "isRealtimeEnabled"; }, never, never, true, never>;
}

declare class AppLogsAutoRefreshModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AppLogsAutoRefreshModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AppLogsAutoRefreshModule, never, [typeof i1.CommonModule, typeof i2.ButtonsModule, typeof AppLogsAutoRefreshComponent], [typeof AppLogsAutoRefreshComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AppLogsAutoRefreshModule>;
}

export { AppLogsAutoRefreshComponent, AppLogsAutoRefreshModule, AppLogsService };
export type { LogsJSON };
//# sourceMappingURL=index.d.ts.map
