Liferay.Loader.define('frontend-taglib-clay$clay-progress-bar@2.24.1/src/ClayProgressBar.soy', ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    /* jshint ignore:start */
    import Component from 'metal-component';
    import Soy from 'metal-soy';

    var templates;
    goog.loadModule(function (exports) {
      var soy = goog.require('soy');

      goog.require('soydata');

      // This file was automatically generated from ClayProgressBar.soy.
      // Please don't edit this file by hand.

      /**
       * @fileoverview Templates in namespace ClayProgressBar.
       * @public
       */

      goog.module('ClayProgressBar.incrementaldom');

      goog.require('goog.soy.data.SanitizedContent');
      var incrementalDom = goog.require('incrementaldom');
      goog.require('soy.asserts');
      var soyIdom = goog.require('soy.idom');

      var $templateAlias1 = Soy.getTemplate('ClayIcon.incrementaldom', 'render');

      /**
       * @param {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  status: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  value: (null|number|undefined)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */
      function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        opt_data = opt_data || {};
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var elementClasses = soy.asserts.assertType(opt_data.elementClasses == null || goog.isString(opt_data.elementClasses) || opt_data.elementClasses instanceof goog.soy.data.SanitizedContent, 'elementClasses', opt_data.elementClasses, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var id = soy.asserts.assertType(opt_data.id == null || goog.isString(opt_data.id) || opt_data.id instanceof goog.soy.data.SanitizedContent, 'id', opt_data.id, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var spritemap = soy.asserts.assertType(opt_data.spritemap == null || goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var status = soy.asserts.assertType(opt_data.status == null || goog.isString(opt_data.status) || opt_data.status instanceof goog.soy.data.SanitizedContent, 'status', opt_data.status, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {null|number|undefined} */
        var value = soy.asserts.assertType(opt_data.value == null || goog.isNumber(opt_data.value), 'value', opt_data.value, 'null|number|undefined');
        var maxValue__soy9 = 100;
        var minValue__soy11 = 0;
        var succeed__soy13 = status == 'complete' || value == maxValue__soy9;

        var currentValue__soy40 = '';
        var $tmp$$2 = null;
        if (value) {
          var $tmp$$1 = null;
          if (value <= maxValue__soy9 && value >= minValue__soy11) {
            $tmp$$1 = value;
          } else if (value < minValue__soy11) {
            $tmp$$1 = minValue__soy11;
          } else {
            $tmp$$1 = maxValue__soy9;
          }
          $tmp$$2 = $tmp$$1;
        } else {
          $tmp$$2 = succeed__soy13 ? maxValue__soy9 : minValue__soy11;
        }
        currentValue__soy40 += $tmp$$2;
        incrementalDom.elementOpenStart('div');
        (function () {
          var $tmp = null;
          if (succeed__soy13) {
            $tmp = ' progress-success';
          } else if (status == 'warning') {
            $tmp = ' progress-warning';
          } else {
            $tmp = ' progress-info';
          }
          incrementalDom.attr('class', 'progress-group' + $tmp + (elementClasses ? ' ' + elementClasses : ''));
          if (id) {
            incrementalDom.attr('id', id);
          }
        })();
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'progress');
        incrementalDom.elementOpenEnd();
        var barAttributes__soy67 = function () {
          incrementalDom.attr('aria-valuemax', maxValue__soy9);
          incrementalDom.attr('aria-valuemin', minValue__soy11);
          incrementalDom.attr('aria-valuenow', currentValue__soy40);
          incrementalDom.attr('class', 'progress-bar');
          incrementalDom.attr('role', 'progressbar');
          incrementalDom.attr('style', 'width: ' + currentValue__soy40 + '%;');
        };
        incrementalDom.elementOpenStart('div');
        barAttributes__soy67();
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'progress-group-addon');
        incrementalDom.elementOpenEnd();
        if (succeed__soy13 && spritemap) {
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'progress-group-feedback');
          incrementalDom.elementOpenEnd();
          $templateAlias1({ spritemap: spritemap, symbol: 'check-circle' }, null, opt_ijData);
          incrementalDom.elementClose('div');
        } else if (currentValue__soy40 != null) {
          soyIdom.print(currentValue__soy40);
          incrementalDom.text('%');
        }
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
      }
      exports.render = $render;
      /**
       * @typedef {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  status: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  value: (null|number|undefined)
       * }}
       */
      $render.Params;
      if (goog.DEBUG) {
        $render.soyTemplateName = 'ClayProgressBar.render';
      }

      exports.render.params = ["elementClasses", "id", "spritemap", "status", "value"];
      exports.render.types = { "elementClasses": "string", "id": "string", "spritemap": "string", "status": "string", "value": "int" };
      templates = exports;
      return exports;
    });

    class ClayProgressBar extends Component {}
    Soy.register(ClayProgressBar, templates);
    export { ClayProgressBar, templates };
    export default templates;
    /* jshint ignore:end */
  }
});
//# sourceMappingURL=ClayProgressBar.soy.js.map