/// <reference types="charm" />
/// <reference types="node" />
/// <reference types="istanbul-lib-coverage" />
import Node from '../executors/Node';
import Environment from '../Environment';
import Suite from '../Suite';
import Test from '../Test';
import Coverage, { CoverageProperties } from './Coverage';
import { CoverageMap } from 'istanbul-lib-coverage';
import { CoverageMessage, DeprecationMessage } from '../executors/Executor';
import { TunnelMessage } from '../executors/Node';
import * as charm from 'charm';
/**
 * Handles presentation of runner results to the user
 */
export default class Pretty extends Coverage implements PrettyProperties {
    colorReplacement: {
        [key: string]: string;
    };
    dimensions: any;
    titleWidth: number;
    maxProgressBarWidth: number;
    tunnelState: string;
    protected _header: string;
    protected _log: string[];
    protected _reports: any;
    protected _spinnerOffset: number;
    protected _total: Report;
    protected _charm: charm.CharmInstance;
    protected _renderTimeout: NodeJS.Timer;
    constructor(executor: Node, config?: PrettyOptions);
    runStart(): void;
    runEnd(): void;
    coverage(data: CoverageMessage): void;
    suiteStart(suite: Suite): void;
    suiteEnd(suite: Suite): void;
    testEnd(test: Test): void;
    tunnelDownloadProgress(message: TunnelMessage): void;
    tunnelStatus(message: TunnelMessage): void;
    error(error: Error): void;
    deprecated(message: DeprecationMessage): void;
    /**
     * Return the reporter for a given session, creating it if necessary.
     */
    private _getReporter(suite);
    /**
     * Create the charm instance used by this reporter.
     */
    private _newCharm();
    private _record(sessionId, result);
    /**
     * Render the progress bar
     * [✔︎~✔︎×✔︎✔︎✔︎✔︎✔︎✔︎] 99/100
     * @param report the report data to render
     * @param width the maximum width for the entire progress bar
     */
    private _drawProgressBar(report, width);
    /**
     * Render a single line
     * TITLE:        [✔︎~✔︎×✔︎✔︎✔︎✔︎✔︎✔︎] 100/100, 2 fail, 1 skip
     * TODO split this into two lines. The first line will display the
     * title, OS and code coverage and the progress bar on the second
     */
    private _drawSessionReport(report);
    /**
     * Abbreviate the environment information for rendering
     * @param env the test environment
     * @returns {string} abbreviated environment information
     */
    private _abbreviateEnvironment(env);
    private _render(omitLogs?);
    private _drawTotalReporter(report);
    private _getColor(value);
}
export interface PrettyProperties extends CoverageProperties {
    colorReplacement: {
        [key: string]: string;
    };
    dimensions: any;
    maxProgressBarWidth: number;
    titleWidth: number;
}
export declare type PrettyOptions = Partial<PrettyProperties>;
/**
 * Model tracking test results
 * @param environment the environment associated with the report
 * @param sessionId the sessionId associated with the report
 */
export declare class Report {
    environment: Environment | undefined;
    sessionId: string | undefined;
    numTotal: number;
    numPassed: number;
    numFailed: number;
    numSkipped: number;
    results: number[];
    coverageMap: CoverageMap;
    constructor(environment?: Environment, sessionId?: string);
    readonly finished: number;
    record(result: number): void;
    getCompressedResults(maxWidth: number): number[];
}
