"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.notify = void 0;
const react_toastify_1 = require("react-toastify");
const constants_1 = require("./constants");
const constants_2 = require("./NotificationTemplate/constants");
const utils_1 = require("./utils");
exports.notify = {
    success: (title, { icon, ...options } = {}) => (0, react_toastify_1.toast)(({ toastProps }) => constants_2.NOTIFICATION_VARIANT.success({ ...options, icon, title }, toastProps), {
        className: (0, utils_1.getClassNameModifierByVariant)(constants_1.NotificationVariantTypes.Success, options.hideProgressBar),
        ...options,
    }),
    info: (title, { icon, ...options } = {}) => (0, react_toastify_1.toast)(({ toastProps }) => constants_2.NOTIFICATION_VARIANT.info({ ...options, icon, title }, toastProps), {
        className: (0, utils_1.getClassNameModifierByVariant)(constants_1.NotificationVariantTypes.Info, options.hideProgressBar),
        ...options,
    }),
    warning: (title, { icon, ...options } = {}) => (0, react_toastify_1.toast)(({ toastProps }) => constants_2.NOTIFICATION_VARIANT.warning({ ...options, icon, title }, toastProps), {
        className: (0, utils_1.getClassNameModifierByVariant)(constants_1.NotificationVariantTypes.Warning, options.hideProgressBar),
        ...options,
    }),
    error: (title, { icon, ...options } = {}) => (0, react_toastify_1.toast)(({ toastProps }) => constants_2.NOTIFICATION_VARIANT.error({ ...options, icon, title }, toastProps), {
        className: (0, utils_1.getClassNameModifierByVariant)(constants_1.NotificationVariantTypes.Error, options.hideProgressBar),
        ...options,
    }),
    custom: react_toastify_1.toast,
    dismiss: react_toastify_1.toast.dismiss,
    update: react_toastify_1.toast.update,
    done: react_toastify_1.toast.done,
};
