"use strict";
const common_vendor = require("../../../../common/vendor.js");
const TUIKit_components_common_Toast_type = require("./type.js");
const Toast = (options) => {
  common_vendor.i.showToast({
    title: options.message || "Toast",
    duration: options.duration || 1500,
    icon: handleIconType(options.type)
  });
};
const handleIconType = (type) => {
  if (!type) {
    return "none";
  }
  switch (type) {
    case TUIKit_components_common_Toast_type.TOAST_TYPE.ERROR:
      return "none";
    case TUIKit_components_common_Toast_type.TOAST_TYPE.WARNING:
      return "none";
    case TUIKit_components_common_Toast_type.TOAST_TYPE.SUCCESS:
      return "success";
    case TUIKit_components_common_Toast_type.TOAST_TYPE.NORMAL:
      return "none";
    default:
      return "none";
  }
};
exports.Toast = Toast;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/common/Toast/index.js.map
