/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
import chalk from 'chalk';
/* eslint-disable @typescript-eslint/no-explicit-any */
// Logger function factory
function loggerFn(color, log = console.log.bind(console)) {
    return (scenarioName, ...data) => {
        const time = new Date().toISOString().split('T')[1];
        const prefix = `${chalk.gray(time)}: [${color(scenarioName)}]: `;
        log(prefix, ...data);
    };
}
const activity = loggerFn(chalk.white.bold);
const scenario = loggerFn(chalk.cyan.bold);
const error = loggerFn(chalk.red.bold, console.error.bind(console));
const warn = loggerFn(chalk.yellow.bold);
export class ConsoleWriter {
    trackActivityEvent(eventName, eventData) {
        activity(eventName, eventData || {});
    }
    trackErrorEvent(eventName, eventData) {
        error(eventName, eventData || {});
    }
    startScenario(scenarioName, startData) {
        scenario(`[scenario:start] ${scenarioName}`, startData || {});
    }
    completeScenario(scenarioName, completeData) {
        scenario(`[scenario:complete] ${scenarioName}`, completeData || {});
    }
    scenarioFailed(scenarioName, failureData) {
        error(`[scenario:failure] ${scenarioName}`, failureData || {});
    }
    scenarioCompletedWithError(scenarioName, completeWithErrorData) {
        warn(`[scenario:completeWithError] ${scenarioName}`, completeWithErrorData || {});
    }
    flush() {
        // No-op for console writer
    }
    setCustomDimension(_key, _value) {
        // No-op for console writer
    }
}
/* eslint-enable @typescript-eslint/no-explicit-any */
//# sourceMappingURL=ConsoleWriter.js.map