/**
 * Diccionari centralitzat d'events del broker.
 * Events agrupats per plugin/iniciativa per facilitar l'organització i escalabilitat.
 */
export const BROKER_EVENTS = {
  activityHistory: {
    refreshDataRequested: "refresh_history_data_requested",
    errorLoadingData: "error_loading_activity_history_data",
    searched: "activity_history_searched",
    filtersCleaned: "activity_history_filters_cleaned",
    diagnosticFilterDeactivated: "activity_history_diagnostic_filter_deactivated",
    injectAsyncHistoryItemsRequest: "inject_async_history_items_request",
    addHistoryItemRequest: "add_history_item_request",
    addHistoryItemsRequest: "add_history_items_request",
    updateHistoryItemRequest: "update_history_item_request",
    removeHistoryItemRequest: "remove_history_item_request",
  },
  shell: {
    appCrashed: "appCrashed",
    mainViewChanged: "mainViewChanged",
    refreshTokenFailed: "refreshTokenFailed",
    mpidHeaderInvalid: "mpidHeaderInvalid",
    quickActionBusyChanged: "quickActionBusyChanged",
    scrollToNavItemRequested: "scrollToNavItemRequested",
    scrollToNavItemCompleted: "scrollToNavItemCompleted",
  },
  administrativeManagement: {
    tabSelected: "administrative_management_tab_selected",
  },
} as const;

export type BrokerEvents = typeof BROKER_EVENTS;
