import { Logger } from '../Logger';
/**
 * Shape of the renderer contract. Except the spinner, every
 * interface accepts a renderer
 */
export interface RendererContract {
    log(message: string): void;
    logError(message: string): void;
    logUpdate(message: string): void;
    logUpdateDone(): void;
}
/**
 * Task update listener. Mainly used by the task renderers
 */
export declare type UpdateListener = (task: TaskContract) => void;
/**
 * Shape of a task
 */
export interface TaskContract {
    title: string;
    state: 'idle' | 'running' | 'failed' | 'succeeded';
    duration?: string;
    completionMessage?: string | {
        message: string;
        stack?: string;
    };
    start(): this;
    onUpdate(callback: UpdateListener): this;
    complete(message?: string): this;
    fail(error: string | {
        message: string;
        stack?: string;
    }): this;
}
/**
 * Callback passed while registering task with the task
 * manager
 */
export declare type TaskCallback = (logger: Logger, task: {
    fail: (error: string | {
        message: string;
        stack?: string;
    }) => Promise<void>;
    complete: (message?: string) => Promise<void>;
}) => void | Promise<void>;
/**
 * Options accepted by the tasks renderers
 */
export declare type TaskRendererOptions = {
    colors: boolean;
    interactive: boolean;
};
/**
 * Options accepted by the tasks manager
 */
export declare type TaskManagerOptions = TaskRendererOptions & {
    verbose: boolean;
};
/**
 * Logging types
 */
export declare type LoggingTypes = 'success' | 'error' | 'fatal' | 'warning' | 'info' | 'debug' | 'await';
/**
 * Options accepted by the logger
 */
export declare type LoggerOptions = {
    colors: boolean;
    labelColors: boolean;
    dim: boolean;
    dimLabels: boolean;
    interactive: boolean;
};
/**
 * Options accepted by table
 */
export declare type TableOptions = {
    colors: boolean;
};
export declare type TableRow = (string | {
    colSpan?: number;
    hAlign?: 'left' | 'center' | 'right';
    content: string;
} | {
    rowSpan?: number;
    vAlign?: 'top' | 'center' | 'bottom';
    content: string;
})[] | {
    [key: string]: string[];
};
/**
 * Options accepted by instructions
 */
export declare type InstructionsOptions = {
    icons: boolean;
    colors: boolean;
};
/**
 * Shape of the instructions line
 */
export declare type InstructionsLine = {
    text: string;
    width: number;
};
