/**
 * UI emitters — typed wrappers for UIEvent domain.
 */
import { createEventEnvelope } from '@pellux/goodvibes-sdk/platform/runtime/events/envelope';
function uiEvent(type, data, ctx) {
    return createEventEnvelope(type, { type, ...data }, ctx);
}
export function emitUiRenderRequest(bus, ctx) {
    bus.emit('ui', uiEvent('UI_RENDER_REQUEST', {}, ctx));
}
export function emitUiScrollDelta(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_SCROLL_DELTA', data, ctx));
}
export function emitUiScrollTo(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_SCROLL_TO', data, ctx));
}
export function emitUiBlockToggleCollapse(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_BLOCK_TOGGLE_COLLAPSE', data, ctx));
}
export function emitUiBlockRerun(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_BLOCK_RERUN', data, ctx));
}
export function emitUiClearScreen(bus, ctx) {
    bus.emit('ui', uiEvent('UI_CLEAR_SCREEN', {}, ctx));
}
export function emitUiPanelOpen(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_PANEL_OPEN', data, ctx));
}
export function emitUiPanelClose(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_PANEL_CLOSE', data, ctx));
}
export function emitUiPanelFocus(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_PANEL_FOCUS', data, ctx));
}
export function emitUiViewChanged(bus, ctx, data) {
    bus.emit('ui', uiEvent('UI_VIEW_CHANGED', data, ctx));
}
