/**
 * Workflow emitters — typed emission wrappers for WRFC workflow events.
 */
import { createEventEnvelope } from '@pellux/goodvibes-sdk/platform/runtime/events/envelope';
export function emitWorkflowChainCreated(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_CHAIN_CREATED', { type: 'WORKFLOW_CHAIN_CREATED', ...data }, ctx));
}
export function emitWorkflowStateChanged(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_STATE_CHANGED', { type: 'WORKFLOW_STATE_CHANGED', ...data }, ctx));
}
export function emitWorkflowReviewCompleted(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_REVIEW_COMPLETED', { type: 'WORKFLOW_REVIEW_COMPLETED', ...data }, ctx));
}
export function emitWorkflowFixAttempted(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_FIX_ATTEMPTED', { type: 'WORKFLOW_FIX_ATTEMPTED', ...data }, ctx));
}
export function emitWorkflowGateResult(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_GATE_RESULT', { type: 'WORKFLOW_GATE_RESULT', ...data }, ctx));
}
export function emitWorkflowChainPassed(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_CHAIN_PASSED', { type: 'WORKFLOW_CHAIN_PASSED', ...data }, ctx));
}
export function emitWorkflowChainFailed(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_CHAIN_FAILED', { type: 'WORKFLOW_CHAIN_FAILED', ...data }, ctx));
}
export function emitWorkflowAutoCommitted(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_AUTO_COMMITTED', { type: 'WORKFLOW_AUTO_COMMITTED', ...data }, ctx));
}
export function emitWorkflowCascadeAborted(bus, ctx, data) {
    bus.emit('workflows', createEventEnvelope('WORKFLOW_CASCADE_ABORTED', { type: 'WORKFLOW_CASCADE_ABORTED', ...data }, ctx));
}
