import { isVNode } from 'vue';
import { ElNotification } from 'element-plus';

const notificationTypes = ["success", "info", "warning", "error"];
const notify = (options) => {
  return ElNotification(options);
};
notificationTypes.forEach((type) => {
  notify[type] = (options = {}) => {
    if (typeof options === "string" || isVNode(options)) {
      options = {
        message: options
      };
    }
    return notify({
      ...options,
      type
    });
  };
});
notify.closeAll = ElNotification.closeAll;
notify.updateOffsets = ElNotification.updateOffsets;
notify._context = ElNotification._context;

export { notify as default, notificationTypes };
//# sourceMappingURL=method.mjs.map
