import { jsx as e, jsxs as C } from "react/jsx-runtime";
import { toast as h, Slide as O } from "react-toastify";
const b = 5e3, y = 999999, k = {
  position: "top-right",
  hideProgressBar: !0,
  pauseOnHover: !0,
  draggable: !0,
  theme: "colored",
  transition: O
}, p = (t) => {
  const { title: i, message: n } = t;
  return /* @__PURE__ */ e("div", { className: "notification", children: /* @__PURE__ */ C("div", { className: "notification-message", role: "alert", children: [
    i && /* @__PURE__ */ e("h4", { className: "title", children: i }),
    /* @__PURE__ */ e("div", { className: "message", children: n })
  ] }) });
}, T = (t) => {
  const {
    timeout: i,
    callback: n,
    iconClassName: a,
    closeButton: r = !1,
    hideProgressBar: c = !0,
    closeOnClick: o = !0
  } = t;
  return {
    ...k,
    autoClose: i || b,
    onClick: n,
    hideProgressBar: c,
    closeOnClick: o,
    // replace the default built-in icons
    icon: /* @__PURE__ */ e("span", { className: `rioglyph ${a}` }),
    // in case a close button is requested, ignore the auto-injected "closeToast" prop
    // as otherwise it will be passed onto the underlying DOM element
    closeButton: r ? ({ closeToast: s }) => /* @__PURE__ */ e("button", { className: "notification-close", type: "button", children: /* @__PURE__ */ e("span", { className: "rioglyph rioglyph-remove" }) }) : !1
  };
}, B = /* @__PURE__ */ (() => {
  const t = (o, s, I) => {
    const { title: l, timeout: u, callback: m, closeButton: f, closeOnClick: g, hideProgressBar: d } = I ?? {}, N = {
      default: "",
      success: "rioglyph-ok text-size-18",
      info: "rioglyph-info-sign text-size-20",
      warn: "rioglyph-exclamation-sign text-size-20",
      error: "rioglyph-error-sign text-size-20"
    };
    return o === "default" ? h(
      /* @__PURE__ */ e(p, { message: s, title: l }),
      T({
        timeout: u,
        callback: m,
        closeButton: f,
        closeOnClick: g,
        hideProgressBar: d,
        iconClassName: N[o]
      })
    ) : h[o](
      /* @__PURE__ */ e(p, { message: s, title: l }),
      T({
        timeout: u,
        callback: m,
        closeButton: f,
        closeOnClick: g,
        hideProgressBar: d,
        iconClassName: N[o]
      })
    );
  };
  return {
    default: (o, s) => t("default", o, s),
    success: (o, s) => t("success", o, s),
    info: (o, s) => t("info", o, s),
    warning: (o, s) => t("warn", o, s),
    error: (o, s) => t("error", o, s)
  };
})();
export {
  b as DEFAULT_NOTIFICATION_TIMEOUT_IN_MS,
  y as NOTIFICATION_TIMEOUT_INFINITE,
  B as default
};
//# sourceMappingURL=Notification.js.map
