export class JsonWizardEventEmitter {
    write;
    constructor(write) {
        this.write = write;
    }
    emit(event) {
        this.write(JSON.stringify(event));
    }
    emitStepStarted(stepId, title) {
        this.emit({ step: stepId, status: 'in_progress', message: title });
    }
    emitStepCompleted(stepId, outcome) {
        this.emit({
            step: stepId,
            status: outcome.status,
            message: outcome.message,
            remediation: outcome.remediation,
        });
    }
    emitAwaitingInput(stepId, prompt, kind, options, defaultValue) {
        this.emit({ step: stepId, status: 'awaiting_input', prompt, kind, options, defaultValue });
    }
    emitInstructions(lines) {
        this.emit({ step: 'instructions', status: 'info', lines });
    }
    emitWarning(message) {
        this.emit({ step: 'warning', status: 'warning', message });
    }
    emitResumeBanner(stepId, position, total) {
        this.emit({ step: 'resume', status: 'resumed', resumeAt: stepId, position, total });
    }
    emitDone(summary) {
        this.emit({ step: 'done', status: 'completed', summary });
    }
}
//# sourceMappingURL=jsonWizardEventEmitter.js.map