import { EventEmitter } from "node:events";

/**
 * Global system event bus for cross-module communication.
 * Used primarily for real-time dashboard updates.
 */
class SystemEventEmitter extends EventEmitter { }

export const systemEvents = new SystemEventEmitter();

export const EVENTS = {
    DASHBOARD: {
        STATS_UPDATE: "dashboard:stats_update",
        NEW_EVENT: "dashboard:new_event",
    },
    ACTIONS: {
        RELOAD_COMMANDS: "actions:reload_commands",
        CLEAR_CACHE: "actions:clear_cache",
        MAINTENANCE_MODE: "actions:maintenance_mode",
    },
    QUEST: {
        COMPLETED: "quest:completed",
    }
} as const;
