Liferay.Loader.define('frontend-taglib-clay$clay-label@2.24.1/src/ClayLabel.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 ClayLabel.soy.
      // Please don't edit this file by hand.

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

      goog.module('ClayLabel.incrementaldom');

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

      var $templateAlias2 = Soy.getTemplate('ClayButton.incrementaldom', 'render');

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

      /**
       * @param {{
       *  _handleCloseButtonClick: (*|null|undefined),
       *  closeable: (boolean|null|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  href: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  size: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  style: (!goog.soy.data.SanitizedContent|boolean|null|string|undefined),
       *  tabIndex: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  truncate: (boolean|null|undefined),
       *  buttonStyle: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  title: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  target: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  download: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaExpanded: (boolean|null|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 {*|null|undefined} */
        opt_data._handleCloseButtonClick;

        /** @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 {!goog.soy.data.SanitizedContent|null|string|undefined} */
        soy.asserts.assertType(opt_data.href == null || goog.isString(opt_data.href) || opt_data.href instanceof goog.soy.data.SanitizedContent, 'href', opt_data.href, '!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|function()|null|string|undefined} */
        soy.asserts.assertType(opt_data.label == null || 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()|null|string|undefined');

        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var size = soy.asserts.assertType(opt_data.size == null || goog.isString(opt_data.size) || opt_data.size instanceof goog.soy.data.SanitizedContent, 'size', opt_data.size, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        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|boolean|null|string|undefined} */
        var style = soy.asserts.assertType(opt_data.style == null || goog.isBoolean(opt_data.style) || opt_data.style === 1 || opt_data.style === 0 || goog.isString(opt_data.style) || opt_data.style instanceof goog.soy.data.SanitizedContent, 'style', opt_data.style, '!goog.soy.data.SanitizedContent|boolean|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var tabIndex = soy.asserts.assertType(opt_data.tabIndex == null || goog.isString(opt_data.tabIndex) || opt_data.tabIndex instanceof goog.soy.data.SanitizedContent, 'tabIndex', opt_data.tabIndex, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {boolean|null|undefined} */
        var truncate = soy.asserts.assertType(opt_data.truncate == null || goog.isBoolean(opt_data.truncate) || opt_data.truncate === 1 || opt_data.truncate === 0, 'truncate', opt_data.truncate, 'boolean|null|undefined');

        incrementalDom.elementOpenStart('span');
        (function () {
          var $tmp = null;
          if (style != null && style != true && style != false) {
            $tmp = ' label-' + style;
          } else if (!(style != null) || style == true) {
            $tmp = ' label-secondary';
          } else {
            $tmp = '';
          }
          incrementalDom.attr('class', 'label' + $tmp + (closeable ? ' label-dismissible' : '') + (elementClasses ? ' ' + elementClasses : '') + (size ? ' label-' + size : '') + (truncate ? ' text-truncate-inline' : ''));
          if (id) {
            incrementalDom.attr('id', id);
          }
          if (tabIndex) {
            incrementalDom.attr('tabIndex', tabIndex);
          }
        })();
        incrementalDom.elementOpenEnd();
        $content(opt_data, null, opt_ijData);
        incrementalDom.elementClose('span');
      }
      exports.render = $render;
      /**
       * @typedef {{
       *  _handleCloseButtonClick: (*|null|undefined),
       *  closeable: (boolean|null|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  href: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  size: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  style: (!goog.soy.data.SanitizedContent|boolean|null|string|undefined),
       *  tabIndex: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  truncate: (boolean|null|undefined),
       *  buttonStyle: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  title: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  target: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  download: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaExpanded: (boolean|null|undefined)
       * }}
       */
      $render.Params;
      if (goog.DEBUG) {
        $render.soyTemplateName = 'ClayLabel.render';
      }

      /**
       * @param {{
       *  _handleCloseButtonClick: (*|null|undefined),
       *  closeable: (boolean|null|undefined),
       *  href: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  tabIndex: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  truncate: (boolean|null|undefined),
       *  buttonStyle: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  title: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  target: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  download: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaExpanded: (boolean|null|undefined),
       *  style: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */
      function $content(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        opt_data = opt_data || {};
        /** @type {*|null|undefined} */
        var _handleCloseButtonClick = opt_data._handleCloseButtonClick;
        /** @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 href = soy.asserts.assertType(opt_data.href == null || goog.isString(opt_data.href) || opt_data.href instanceof goog.soy.data.SanitizedContent, 'href', opt_data.href, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|function()|null|string|undefined} */
        var label = soy.asserts.assertType(opt_data.label == null || 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()|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 tabIndex = soy.asserts.assertType(opt_data.tabIndex == null || goog.isString(opt_data.tabIndex) || opt_data.tabIndex instanceof goog.soy.data.SanitizedContent, 'tabIndex', opt_data.tabIndex, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {boolean|null|undefined} */
        var truncate = soy.asserts.assertType(opt_data.truncate == null || goog.isBoolean(opt_data.truncate) || opt_data.truncate === 1 || opt_data.truncate === 0, 'truncate', opt_data.truncate, 'boolean|null|undefined');
        var labelContent__soy78 = function () {
          var labelContentClass__soy80 = '';
          labelContentClass__soy80 += 'label-item label-item-expand';
          labelContentClass__soy80 += truncate ? ' text-truncate' : '';
          incrementalDom.elementOpenStart('span');
          incrementalDom.attr('class', labelContentClass__soy80);
          incrementalDom.elementOpenEnd();
          if (href) {
            $templateAlias1(opt_data, null, opt_ijData);
          } else {
            soyIdom.print(label);
          }
          incrementalDom.elementClose('span');
        };
        if (closeable && spritemap) {
          var msg_718__soy719 = '';
          /** @desc The word 'Close' used as a verb */
          var MSG_EXTERNAL_202442244688100878 = Liferay.Language.get('close');
          msg_718__soy719 += MSG_EXTERNAL_202442244688100878;
          labelContent__soy78();
          incrementalDom.elementOpenStart('span');
          incrementalDom.attr('class', 'label-item label-item-after');
          incrementalDom.elementOpenEnd();
          $templateAlias2({ ariaLabel: '' + msg_718__soy719, elementClasses: 'close', events: { click: _handleCloseButtonClick }, icon: 'times', iconAlignment: 'right', ref: 'closeButton', spritemap: spritemap, style: false, tabIndex: tabIndex ? '-1' : null, type: 'button', useDefaultClasses: false }, null, opt_ijData);
          incrementalDom.elementClose('span');
        } else {
          labelContent__soy78();
        }
      }
      exports.content = $content;
      /**
       * @typedef {{
       *  _handleCloseButtonClick: (*|null|undefined),
       *  closeable: (boolean|null|undefined),
       *  href: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  tabIndex: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  truncate: (boolean|null|undefined),
       *  buttonStyle: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  title: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  target: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  download: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  ariaExpanded: (boolean|null|undefined),
       *  style: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }}
       */
      $content.Params;
      if (goog.DEBUG) {
        $content.soyTemplateName = 'ClayLabel.content';
      }

      exports.render.params = ["_handleCloseButtonClick", "closeable", "elementClasses", "href", "id", "label", "size", "spritemap", "style", "tabIndex", "truncate"];
      exports.render.types = { "_handleCloseButtonClick": "any", "closeable": "bool", "elementClasses": "string", "href": "string", "id": "string", "label": "html|string", "size": "string", "spritemap": "string", "style": "bool|string", "tabIndex": "string", "truncate": "bool" };
      exports.content.params = ["_handleCloseButtonClick", "closeable", "href", "label", "spritemap", "tabIndex", "truncate"];
      exports.content.types = { "_handleCloseButtonClick": "any", "closeable": "bool", "href": "string", "label": "html|string", "spritemap": "string", "tabIndex": "string", "truncate": "bool" };
      templates = exports;
      return exports;
    });

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