Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/shared/util/toast.es", ['module', 'exports', 'require', 'frontend-js-web/liferay/toast/commands/OpenToast.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.openErrorToast = openErrorToast;
    exports.openSuccessToast = openSuccessToast;
    exports.openToast = openToast;

    var _OpenToast = _interopRequireDefault(require("frontend-js-web/liferay/toast/commands/OpenToast.es"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    function openErrorToast(_ref) {
      var message = _ref.message;
      openToast(message, Liferay.Language.get('error'), 'danger');
    }

    function openSuccessToast(message) {
      var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Liferay.Language.get('success');
      openToast(message, title, 'success');
    }

    function openToast(message, title, type) {
      (0, _OpenToast.default)({
        message: message,
        title: title,
        type: type
      });
    }
    //# sourceMappingURL=toast.es.js.map
  }
});
//# sourceMappingURL=toast.es.js.map