/// <reference types="xrm" />
/**
 * Manages state and actions for Dynamics notifications at the form
 * level (not attribute level). Hence, these are for user presentation
 * so the text message should be relevant to a user.
 */
import { XRM } from "./xrm";
/** Basic message interface, Dynamics and non-Dynamics. */
export interface Notification {
    message: string;
    level: Xrm.FormNotificationLevel;
    /** Need to implement field level. */
    field?: string;
    /** Duration in seconds. */
    removeAfter?: number;
}
export declare type MessageId = string;
export interface Notifier {
    /** If successful, return id, else null. */
    add(n: Notification): MessageId | null;
    /** Return boolean indicating success. */
    remove(MessageId: any): boolean;
}
export declare class NotificationManager implements Notifier {
    constructor(getXrm: () => XRM | null);
    private getXrm;
    private notifications;
    add: (msg: Notification) => string | null;
    remove: (id: string) => boolean;
    clearAll: () => void;
}
export default NotificationManager;
