/**
 * Toastr Definitions.
 */
import toastr from 'toastr';
/**
 * Toastr alerts
 */
export const toastrConfig = {
    closeButton: true,
    progressBar: true,
    newestOnTop: true,
    preventDuplicates: true,
    timeOut: 3000,
    extendedTimeOut: 1000,
    positionClass: 'toast-bottom-right',
    showDuration: 300,
    hideDuration: 300,
    showMethod: 'fadeIn',
    hideMethod: 'fadeOut',
};
/**
 * Initialize toastr options
 */
export function toastrInit(config = {}) {
    toastr.options = {
        ...toastrConfig,
        ...config,
    };
}
/**
 * Reset to default config
 */
export function toastrReset() {
    toastrInit(toastrConfig);
}
/**
 * Success toast
 */
export function toastrSuccess(message, title = 'Success', config = {}) {
    toastrInit(config);
    toastr.success(message, title);
}
/**
 * Error toast
 */
export function toastrError(message, title = 'Error', config = {}) {
    toastrInit(config);
    toastr.error(message, title);
}
/**
 * Warning toast
 */
export function toastrWarning(message, title = 'Warning', config = {}) {
    toastrInit(config);
    toastr.warning(message, title);
}
/**
 * Info toast
 */
export function toastrInfo(message, title = 'Info', config = {}) {
    toastrInit(config);
    toastr.info(message, title);
}
/**
 * Clear all toasts
 */
export function toastrClear() {
    toastr.clear();
}
/**
 * Remove all toasts immediately
 */
export function toastrRemove() {
    toastr.remove();
}
//# sourceMappingURL=toast.js.map