Liferay.Loader.define('commerce-frontend-js@3.0.43/utilities/notifications', ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.showNotification = showNotification;
    exports.showErrorNotification = showErrorNotification;

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    function showNotification(message) {
      var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
      var closeable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
      var duration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 500;

      if (!window.AUI) {
        return;
      }

      AUI().use('liferay-notification', function () {
        new Liferay.Notification({
          closeable: closeable,
          delay: {
            hide: 5000,
            show: 0
          },
          duration: duration,
          message: message,
          render: true,
          title: Liferay.Language.get(type),
          type: type
        });
      });
    }

    function showErrorNotification() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Liferay.Language.get('unexpected-error');
      showNotification(e, 'danger');
    }
    //# sourceMappingURL=notifications.js.map
  }
});
//# sourceMappingURL=notifications.js.map