@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
48 lines (47 loc) • 1.47 kB
TypeScript
import type { NeonAlertMessage } from '@/model/feedback/alert/NeonAlertMessage';
import { NeonAlertLevel } from '@/model/feedback/alert/NeonAlertLevel';
/**
* NeonAlertService is a service for sending alerts to the <strong>NeonAlert</strong> component for display to the user.
*/
export declare class NeonAlertService {
static readonly removeEventKey: string;
/**
* Send an info message.
*
* @param alert The info message to display.
*/
static info(alert: NeonAlertMessage): void;
/**
* Send a success message.
*
* @param alert The success message to display.
*/
static success(alert: NeonAlertMessage): void;
/**
* Send a warning message.
*
* @param alert The warning message to display.
*/
static warn(alert: NeonAlertMessage): void;
/**
* Send an error message.
*
* @param alert The error message to display.
*/
static error(alert: NeonAlertMessage): void;
/**
* Remove a message.
*
* @param key Key of the message to delete.
*/
static remove(key: string): void;
/**
* Generate an event key so that all events are published on the correct topic.
*
* @param eventType Alert level of the event.
*
* @returns The event key for sending a message on <a href="/utils/NeonEventBus">NeonEventBus</a>.
*/
static generateEventKey(eventType: NeonAlertLevel): string;
private static emit;
}