Liferay.Loader.define("frontend-image-editor-web@4.0.37/BrightnessSlider.soy", ['module', 'exports', 'require', 'frontend-js-metal-web$metal-component', 'frontend-js-metal-web$metal-soy'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.templates = exports.BrightnessSlider = void 0;

    var _metalComponent = _interopRequireDefault(require("frontend-js-metal-web$metal-component"));

    var _metalSoy = _interopRequireDefault(require("frontend-js-metal-web$metal-soy"));

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

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    function _possibleConstructorReturn(self, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }return _assertThisInitialized(self);
    }

    function _assertThisInitialized(self) {
      if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }return self;
    }

    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
      };return _getPrototypeOf(o);
    }

    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);
    }

    function _setPrototypeOf(o, p) {
      _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
        o.__proto__ = p;return o;
      };return _setPrototypeOf(o, p);
    }

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

      goog.require('soydata');

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

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

      goog.module('BrightnessSlider.incrementaldom');

      goog.require('goog.soy.data.SanitizedContent');

      var incrementalDom = goog.require('incrementaldom');

      goog.require('soy.asserts');

      var soyIdom = goog.require('soy.idom');
      /**
       * @param {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  inputName: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  max: (null|number|undefined),
       *  min: (null|number|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;
        var $$temp;
        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 inputName = soy.asserts.assertType(opt_data.inputName == null || goog.isString(opt_data.inputName) || opt_data.inputName instanceof goog.soy.data.SanitizedContent, 'inputName', opt_data.inputName, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {null|number|undefined} */

        var max = soy.asserts.assertType(opt_data.max == null || goog.isNumber(opt_data.max), 'max', opt_data.max, 'null|number|undefined');
        /** @type {null|number|undefined} */

        var min = soy.asserts.assertType(opt_data.min == null || goog.isNumber(opt_data.min), 'min', opt_data.min, 'null|number|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 maxNumber__soy76 = ($$temp = max) == null ? 100 : $$temp;
        var minNumber__soy78 = ($$temp = min) == null ? 0 : $$temp;
        var valueNumber__soy80 = ($$temp = value) == null ? 0 : $$temp;
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'slider ' + (($$temp = elementClasses) == null ? '' : $$temp));
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('input');
        incrementalDom.attr('name', ($$temp = inputName) == null ? '' : $$temp);
        incrementalDom.attr('type', 'hidden');
        incrementalDom.attr('value', valueNumber__soy80);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('input');
        incrementalDom.elementOpen('span');
        soyIdom.print(valueNumber__soy80);
        incrementalDom.elementClose('span');
        var percentage__soy90 = 100 * (valueNumber__soy80 - minNumber__soy78) / (maxNumber__soy76 - minNumber__soy78) + '%';
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'rail');
        incrementalDom.attr('data-onclick', 'onRailClick_');
        incrementalDom.attr('ref', 'rail');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'rail-active');
        incrementalDom.attr('style', 'width: ' + percentage__soy90);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'rail-handle');
        incrementalDom.attr('style', 'left: ' + percentage__soy90);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'handle');
        incrementalDom.attr('ref', 'handle');
        incrementalDom.attr('tabindex', '0');
        incrementalDom.attr('role', 'slider');
        incrementalDom.attr('aria-valuemin', minNumber__soy78);
        incrementalDom.attr('aria-valuemax', maxNumber__soy76);
        incrementalDom.attr('aria-valuenow', valueNumber__soy80);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  inputName: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  max: (null|number|undefined),
       *  min: (null|number|undefined),
       *  value: (null|number|undefined)
       * }}
       */

      $render.Params;

      if (goog.DEBUG) {
        $render.soyTemplateName = 'BrightnessSlider.render';
      }

      exports.render.params = ["elementClasses", "inputName", "max", "min", "value"];
      exports.render.types = {
        "elementClasses": "string",
        "inputName": "string",
        "max": "int",
        "min": "int",
        "value": "int"
      };
      exports.templates = templates = exports;
      return exports;
    });

    var BrightnessSlider = /*#__PURE__*/function (_Component) {
      _inherits(BrightnessSlider, _Component);

      function BrightnessSlider() {
        _classCallCheck(this, BrightnessSlider);

        return _possibleConstructorReturn(this, _getPrototypeOf(BrightnessSlider).apply(this, arguments));
      }

      return BrightnessSlider;
    }(_metalComponent.default);

    exports.BrightnessSlider = BrightnessSlider;

    _metalSoy.default.register(BrightnessSlider, templates);

    var _default = templates;
    /* jshint ignore:end */

    exports.default = _default;
    //# sourceMappingURL=BrightnessSlider.soy.js.map
  }
});
//# sourceMappingURL=BrightnessSlider.soy.js.map