/**
 * KRA - Event Bus Utility
 * Event emitter for cross-component communication
 */
import mitt from 'mitt';

type Events = {
  'closeThisPage': void;
  'show-error': { code: string | number; message: string; fn?: () => void };
  [key: string]: any;
};

export const emitter = mitt<Events>();

export default emitter;
