/**
 * Control-plane emitters — typed wrappers for ControlPlaneEvent domain.
 */
import { createEventEnvelope } from '@pellux/goodvibes-sdk/platform/runtime/events/envelope';
function controlPlaneEvent(type, data, ctx) {
    return createEventEnvelope(type, { type, ...data }, ctx);
}
export function emitControlPlaneClientConnected(bus, ctx, data) {
    bus.emit('control-plane', controlPlaneEvent('CONTROL_PLANE_CLIENT_CONNECTED', data, ctx));
}
export function emitControlPlaneClientDisconnected(bus, ctx, data) {
    bus.emit('control-plane', controlPlaneEvent('CONTROL_PLANE_CLIENT_DISCONNECTED', data, ctx));
}
export function emitControlPlaneSubscriptionCreated(bus, ctx, data) {
    bus.emit('control-plane', controlPlaneEvent('CONTROL_PLANE_SUBSCRIPTION_CREATED', data, ctx));
}
export function emitControlPlaneSubscriptionDropped(bus, ctx, data) {
    bus.emit('control-plane', controlPlaneEvent('CONTROL_PLANE_SUBSCRIPTION_DROPPED', data, ctx));
}
export function emitControlPlaneAuthGranted(bus, ctx, data) {
    bus.emit('control-plane', controlPlaneEvent('CONTROL_PLANE_AUTH_GRANTED', data, ctx));
}
export function emitControlPlaneAuthRejected(bus, ctx, data) {
    bus.emit('control-plane', controlPlaneEvent('CONTROL_PLANE_AUTH_REJECTED', data, ctx));
}
