/** Handler signature for Asuka event bus. Returning `false` can cancel cancellable events. */
export type AsukaEventHandler<T = any> = (payload?: T) => void | boolean;

/**
 * Common event names used by the core.
 * Note: the bus stays open-ended; you can emit/listen to custom strings too.
 */
export type AsukaEventName = string;

export interface PermissionDeniedPayload {
  key: string;
  reason: string;
  action?: string;
  cancelled?: boolean;
  [k: string]: any;
}