'use strict';

Liferay.Loader.define('frontend-taglib-clay$clay-management-toolbar@2.24.1/lib/ClayFilterLabel.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.templates = exports.ClayFilterLabel = undefined;

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

    var _metalComponent2 = _interopRequireDefault(_metalComponent);

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

    var _metalSoy2 = _interopRequireDefault(_metalSoy);

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

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

    function _possibleConstructorReturn(self, call) {
      if (!self) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
      }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    } /* jshint ignore:start */

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

      goog.require('soydata');

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

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

      goog.module('ClayFilterLabel.incrementaldom');

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

      var $templateAlias1 = _metalSoy2.default.getTemplate('ClayLabel.incrementaldom', 'render');

      /**
       * @param {{
       *  label: (!goog.soy.data.SanitizedContent|function()|string),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleFilterLabelCloseClicked: (*|null|undefined),
       *  closeable: (boolean|null|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  filterData: (?)
       * }} 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;
        /** @type {!goog.soy.data.SanitizedContent|function()|string} */
        var label = soy.asserts.assertType(goog.isFunction(opt_data.label) || goog.isString(opt_data.label) || opt_data.label instanceof goog.soy.data.SanitizedContent, 'label', opt_data.label, '!goog.soy.data.SanitizedContent|function()|string');
        /** @type {!goog.soy.data.SanitizedContent|string} */
        var spritemap = soy.asserts.assertType(goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|string');
        /** @type {*|null|undefined} */
        var _handleFilterLabelCloseClicked = opt_data._handleFilterLabelCloseClicked;
        /** @type {boolean|null|undefined} */
        var closeable = soy.asserts.assertType(opt_data.closeable == null || goog.isBoolean(opt_data.closeable) || opt_data.closeable === 1 || opt_data.closeable === 0, 'closeable', opt_data.closeable, 'boolean|null|undefined');
        /** @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 {?} */
        var filterData = opt_data.filterData;

        incrementalDom.elementOpenStart('div');
        (function elementAttributes__soy10() {
          if (elementClasses) {
            incrementalDom.attr('class', elementClasses);
          }
        })();
        incrementalDom.elementOpenEnd();

        $templateAlias1({ closeable: closeable, data: filterData, elementClasses: 'component-label tbar-label', events: { close: _handleFilterLabelCloseClicked }, label: function param26() {
            incrementalDom.elementOpenStart('div');
            incrementalDom.attr('class', 'label-section');
            incrementalDom.elementOpenEnd();
            soyIdom.print(label);
            incrementalDom.elementClose('div');
          }, ref: 'label', spritemap: spritemap, style: false }, null, opt_ijData);
        incrementalDom.elementClose('div');
      }
      exports.render = $render;
      /**
       * @typedef {{
       *  label: (!goog.soy.data.SanitizedContent|function()|string),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleFilterLabelCloseClicked: (*|null|undefined),
       *  closeable: (boolean|null|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  filterData: (?)
       * }}
       */
      $render.Params;
      if (goog.DEBUG) {
        $render.soyTemplateName = 'ClayFilterLabel.render';
      }

      exports.render.params = ["label", "spritemap", "_handleFilterLabelCloseClicked", "closeable", "elementClasses", "filterData"];
      exports.render.types = { "label": "html|string", "spritemap": "string", "_handleFilterLabelCloseClicked": "any", "closeable": "bool", "elementClasses": "string", "filterData": "?" };
      exports.templates = templates = exports;
      return exports;
    });

    var ClayFilterLabel = function (_Component) {
      _inherits(ClayFilterLabel, _Component);

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

        return _possibleConstructorReturn(this, (ClayFilterLabel.__proto__ || Object.getPrototypeOf(ClayFilterLabel)).apply(this, arguments));
      }

      return ClayFilterLabel;
    }(_metalComponent2.default);

    _metalSoy2.default.register(ClayFilterLabel, templates);
    exports.ClayFilterLabel = ClayFilterLabel;
    exports.templates = templates;
    exports.default = templates;
    /* jshint ignore:end */
    //# sourceMappingURL=ClayFilterLabel.soy.js.map
  }
});
//# sourceMappingURL=ClayFilterLabel.soy.js.map