'use strict';

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

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

      goog.module('ClaySticker.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('ClayIcon.incrementaldom', 'render');

      /**
       * @param {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  outside: (boolean|null|undefined),
       *  position: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  shape: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  size: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  style: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  title: (!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 $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} */
        soy.asserts.assertType(opt_data.icon == null || goog.isString(opt_data.icon) || opt_data.icon instanceof goog.soy.data.SanitizedContent, 'icon', opt_data.icon, '!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} */
        soy.asserts.assertType(opt_data.imageAlt == null || goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent, 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|null|string|undefined');
        soy.asserts.assertType(opt_data.imageSrc == null || goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent, 'imageSrc', opt_data.imageSrc, '!goog.soy.data.SanitizedContent|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 {boolean|null|undefined} */
        var outside = soy.asserts.assertType(opt_data.outside == null || goog.isBoolean(opt_data.outside) || opt_data.outside === 1 || opt_data.outside === 0, 'outside', opt_data.outside, 'boolean|null|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var position = soy.asserts.assertType(opt_data.position == null || goog.isString(opt_data.position) || opt_data.position instanceof goog.soy.data.SanitizedContent, 'position', opt_data.position, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var shape = soy.asserts.assertType(opt_data.shape == null || goog.isString(opt_data.shape) || opt_data.shape instanceof goog.soy.data.SanitizedContent, 'shape', opt_data.shape, '!goog.soy.data.SanitizedContent|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|null|string|undefined} */
        var style = soy.asserts.assertType(opt_data.style == null || goog.isString(opt_data.style) || opt_data.style instanceof goog.soy.data.SanitizedContent, 'style', opt_data.style, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var title = soy.asserts.assertType(opt_data.title == null || goog.isString(opt_data.title) || opt_data.title instanceof goog.soy.data.SanitizedContent, 'title', opt_data.title, '!goog.soy.data.SanitizedContent|null|string|undefined');
        var attributes__soy17 = function attributes__soy17() {
          incrementalDom.attr('class', 'sticker sticker-' + (($$temp = shape) == null ? 'rounded' : $$temp) + ' sticker-' + (($$temp = style) == null ? 'primary' : $$temp) + (position ? (outside ? ' sticker-outside' : '') + ' sticker-' + position : '') + (size ? ' sticker-' + size : '') + (elementClasses ? ' ' + elementClasses : ''));
          if (id) {
            incrementalDom.attr('id', id);
          }
          if (title) {
            incrementalDom.attr('title', title);
          }
        };
        incrementalDom.elementOpenStart('span');
        attributes__soy17();
        incrementalDom.elementOpenEnd();
        $content(opt_data, null, opt_ijData);
        incrementalDom.elementClose('span');
      }
      exports.render = $render;
      /**
       * @typedef {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  outside: (boolean|null|undefined),
       *  position: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  shape: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  size: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  style: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  title: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }}
       */
      $render.Params;
      if (goog.DEBUG) {
        $render.soyTemplateName = 'ClaySticker.render';
      }

      /**
       * @param {{
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  spritemap: (!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;
        var $$temp;
        opt_data = opt_data || {};
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var icon = soy.asserts.assertType(opt_data.icon == null || goog.isString(opt_data.icon) || opt_data.icon instanceof goog.soy.data.SanitizedContent, 'icon', opt_data.icon, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var imageAlt = soy.asserts.assertType(opt_data.imageAlt == null || goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent, 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var imageSrc = soy.asserts.assertType(opt_data.imageSrc == null || goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent, 'imageSrc', opt_data.imageSrc, '!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');
        var classes__soy74 = '';
        classes__soy74 += icon && spritemap ? 'inline-item' : 'sticker-overlay';
        incrementalDom.elementOpenStart('span');
        incrementalDom.attr('class', classes__soy74);
        incrementalDom.elementOpenEnd();
        if (icon && spritemap) {
          $templateAlias1({ spritemap: spritemap, symbol: icon }, null, opt_ijData);
        } else if (imageSrc) {
          $image({ imageAlt: ($$temp = imageAlt) == null ? '' : $$temp, imageSrc: imageSrc }, null, opt_ijData);
        } else if (label) {
          soyIdom.print(label);
        }
        incrementalDom.elementClose('span');
      }
      exports.content = $content;
      /**
       * @typedef {{
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }}
       */
      $content.Params;
      if (goog.DEBUG) {
        $content.soyTemplateName = 'ClaySticker.content';
      }

      /**
       * @param {{
       *  imageAlt: (!goog.soy.data.SanitizedContent|string),
       *  imageSrc: (!goog.soy.data.SanitizedContent|string)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */
      function $image(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        /** @type {!goog.soy.data.SanitizedContent|string} */
        var imageAlt = soy.asserts.assertType(goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent, 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|string');
        /** @type {!goog.soy.data.SanitizedContent|string} */
        var imageSrc = soy.asserts.assertType(goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent, 'imageSrc', opt_data.imageSrc, '!goog.soy.data.SanitizedContent|string');

        incrementalDom.elementOpenStart('img');
        (function imageAttributes__soy107() {
          incrementalDom.attr('alt', imageAlt);
          incrementalDom.attr('class', 'sticker-img');
          incrementalDom.attr('src', imageSrc);
        })();
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('img');
      }
      exports.image = $image;
      /**
       * @typedef {{
       *  imageAlt: (!goog.soy.data.SanitizedContent|string),
       *  imageSrc: (!goog.soy.data.SanitizedContent|string)
       * }}
       */
      $image.Params;
      if (goog.DEBUG) {
        $image.soyTemplateName = 'ClaySticker.image';
      }

      exports.render.params = ["elementClasses", "icon", "id", "imageAlt", "imageSrc", "label", "outside", "position", "shape", "size", "spritemap", "style", "title"];
      exports.render.types = { "elementClasses": "string", "icon": "string", "id": "string", "imageAlt": "string", "imageSrc": "string", "label": "html|string", "outside": "bool", "position": "string", "shape": "string", "size": "string", "spritemap": "string", "style": "string", "title": "string" };
      exports.content.params = ["icon", "imageAlt", "imageSrc", "label", "spritemap"];
      exports.content.types = { "icon": "string", "imageAlt": "string", "imageSrc": "string", "label": "html|string", "spritemap": "string" };
      exports.image.params = ["imageAlt", "imageSrc"];
      exports.image.types = { "imageAlt": "string", "imageSrc": "string" };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return ClaySticker;
    }(_metalComponent2.default);

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