import { green, red, yellow, dim, bold } from '../../../shared/services/ansiColors.js';
export class HumanWizardEventEmitter {
    write;
    constructor(write) {
        this.write = write;
    }
    emitStepStarted(_stepId, title) {
        this.write(`${bold('→')} ${title}`);
    }
    emitStepCompleted(_stepId, outcome) {
        if (outcome.status === 'succeeded') {
            this.write(`  ${green('✓')} ${outcome.message ?? 'succeeded'}`);
            return;
        }
        if (outcome.status === 'skipped') {
            this.write(`  ${dim('•')} ${outcome.message ?? 'skipped'}`);
            return;
        }
        if (outcome.status === 'warning') {
            this.write(`  ${yellow('!')} ${outcome.message ?? 'warning'}`);
            return;
        }
        this.write(`  ${red('✗')} ${outcome.message ?? 'blocked'}`);
        if (outcome.remediation) {
            this.write(`    ${dim('→')} ${outcome.remediation}`);
        }
    }
    emitAwaitingInput(_stepId, prompt, _kind, _options, _defaultValue) {
        this.write(`  ${dim('?')} ${prompt}`);
    }
    emitInstructions(lines) {
        for (const line of lines) {
            this.write(line);
        }
    }
    emitWarning(message) {
        this.write(`${yellow('⚠')}  ${message}`);
    }
    emitResumeBanner(_stepId, position, total) {
        this.write(dim(`Reprise du setup à l'étape ${position}/${total}`));
    }
    emitDone(summary) {
        this.write(green(bold(`Setup terminé. ${JSON.stringify(summary)}`)));
    }
}
//# sourceMappingURL=humanWizardEventEmitter.js.map