'use strict';

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

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

      goog.module('ClayDropdown.incrementaldom');

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

      var $templateAlias2 = _metalSoy2.default.getTemplate('ClayDropdownBase.incrementaldom', 'render');

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

      /**
       * @param {{
       *  items: !Array<?>,
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleButtonClick: (*|null|undefined),
       *  _handleItemClick: (*|null|undefined),
       *  button: (?),
       *  contentRenderer: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  disabled: (boolean|null|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  expanded: (boolean|null|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  itemsIconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  preferredAlign: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  searchable: (boolean|null|undefined),
       *  showToggleIcon: (boolean|null|undefined),
       *  style: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  toggle: (*|null|undefined),
       *  triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  triggerSize: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  triggerTitle: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  useSearchableWithForm: (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;
        /** @type {!Array<?>} */
        var items = soy.asserts.assertType(goog.isArray(opt_data.items), 'items', opt_data.items, '!Array<?>');
        /** @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 _handleButtonClick = opt_data._handleButtonClick;
        /** @type {*|null|undefined} */
        var _handleItemClick = opt_data._handleItemClick;
        /** @type {?} */
        var button = opt_data.button;
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var contentRenderer = soy.asserts.assertType(opt_data.contentRenderer == null || goog.isString(opt_data.contentRenderer) || opt_data.contentRenderer instanceof goog.soy.data.SanitizedContent, 'contentRenderer', opt_data.contentRenderer, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {boolean|null|undefined} */
        var disabled = soy.asserts.assertType(opt_data.disabled == null || goog.isBoolean(opt_data.disabled) || opt_data.disabled === 1 || opt_data.disabled === 0, 'disabled', opt_data.disabled, '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 {boolean|null|undefined} */
        var expanded = soy.asserts.assertType(opt_data.expanded == null || goog.isBoolean(opt_data.expanded) || opt_data.expanded === 1 || opt_data.expanded === 0, 'expanded', opt_data.expanded, 'boolean|null|undefined');
        /** @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 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 itemsIconAlignment = soy.asserts.assertType(opt_data.itemsIconAlignment == null || goog.isString(opt_data.itemsIconAlignment) || opt_data.itemsIconAlignment instanceof goog.soy.data.SanitizedContent, 'itemsIconAlignment', opt_data.itemsIconAlignment, '!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 preferredAlign = soy.asserts.assertType(opt_data.preferredAlign == null || goog.isString(opt_data.preferredAlign) || opt_data.preferredAlign instanceof goog.soy.data.SanitizedContent, 'preferredAlign', opt_data.preferredAlign, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {boolean|null|undefined} */
        var searchable = soy.asserts.assertType(opt_data.searchable == null || goog.isBoolean(opt_data.searchable) || opt_data.searchable === 1 || opt_data.searchable === 0, 'searchable', opt_data.searchable, 'boolean|null|undefined');
        /** @type {boolean|null|undefined} */
        var showToggleIcon = soy.asserts.assertType(opt_data.showToggleIcon == null || goog.isBoolean(opt_data.showToggleIcon) || opt_data.showToggleIcon === 1 || opt_data.showToggleIcon === 0, 'showToggleIcon', opt_data.showToggleIcon, 'boolean|null|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 {*|null|undefined} */
        var toggle = opt_data.toggle;
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent, 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var triggerClasses = soy.asserts.assertType(opt_data.triggerClasses == null || goog.isString(opt_data.triggerClasses) || opt_data.triggerClasses instanceof goog.soy.data.SanitizedContent, 'triggerClasses', opt_data.triggerClasses, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var triggerSize = soy.asserts.assertType(opt_data.triggerSize == null || goog.isString(opt_data.triggerSize) || opt_data.triggerSize instanceof goog.soy.data.SanitizedContent, 'triggerSize', opt_data.triggerSize, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
        var triggerTitle = soy.asserts.assertType(opt_data.triggerTitle == null || goog.isString(opt_data.triggerTitle) || opt_data.triggerTitle instanceof goog.soy.data.SanitizedContent, 'triggerTitle', opt_data.triggerTitle, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {boolean|null|undefined} */
        var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0, 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined');
        var trigger__soy218 = function trigger__soy218() {
          if (icon) {
            $templateAlias1({ elementClasses: label ? 'inline-item inline-item-before' : '', spritemap: spritemap, symbol: icon }, null, opt_ijData);
          }
          if (label) {
            soyIdom.print(label);
          }
          if ((!(showToggleIcon != null) || showToggleIcon) && !icon) {
            $templateAlias1({ elementClasses: 'inline-item inline-item-after', spritemap: spritemap, symbol: 'caret-bottom' }, null, opt_ijData);
          }
        };
        $templateAlias2({ button: button, contentRenderer: contentRenderer, disabled: disabled, elementClasses: elementClasses, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy218, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle, useSearchableWithForm: useSearchableWithForm }, null, opt_ijData);
      }
      exports.render = $render;
      /**
       * @typedef {{
       *  items: !Array<?>,
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleButtonClick: (*|null|undefined),
       *  _handleItemClick: (*|null|undefined),
       *  button: (?),
       *  contentRenderer: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  disabled: (boolean|null|undefined),
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  expanded: (boolean|null|undefined),
       *  icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  itemsIconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
       *  preferredAlign: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  searchable: (boolean|null|undefined),
       *  showToggleIcon: (boolean|null|undefined),
       *  style: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  toggle: (*|null|undefined),
       *  triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  triggerSize: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  triggerTitle: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  useSearchableWithForm: (boolean|null|undefined)
       * }}
       */
      $render.Params;
      if (goog.DEBUG) {
        $render.soyTemplateName = 'ClayDropdown.render';
      }

      exports.render.params = ["items", "spritemap", "_handleButtonClick", "_handleItemClick", "button", "contentRenderer", "disabled", "elementClasses", "expanded", "icon", "id", "itemsIconAlignment", "label", "preferredAlign", "searchable", "showToggleIcon", "style", "toggle", "triggerAriaLabel", "triggerClasses", "triggerSize", "triggerTitle", "useSearchableWithForm"];
      exports.render.types = { "items": "list<?>", "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "button": "?", "contentRenderer": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "icon": "string", "id": "string", "itemsIconAlignment": "string", "label": "html|string", "preferredAlign": "string", "searchable": "bool", "showToggleIcon": "bool", "style": "string", "toggle": "any", "triggerAriaLabel": "string", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string", "useSearchableWithForm": "bool" };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return ClayDropdown;
    }(_metalComponent2.default);

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