'use strict';

Liferay.Loader.define("frontend-taglib-clay$clay-card-grid@2.24.1/lib/ClayCardGrid", ['module', 'exports', 'require', 'frontend-taglib-clay$clay-component', 'frontend-js-metal-web$metal-web-component', 'frontend-js-metal-web$metal-soy', 'frontend-taglib-clay$clay-card', 'frontend-js-metal-web$metal-state', './ClayCardGrid.soy'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.ClayCardGrid = undefined;

    var _createClass = function () {
      function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
        }
      }return function (Constructor, protoProps, staticProps) {
        if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
      };
    }();

    var _clayComponent = require("frontend-taglib-clay$clay-component");

    var _clayComponent2 = _interopRequireDefault(_clayComponent);

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

    var _metalWebComponent2 = _interopRequireDefault(_metalWebComponent);

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

    var _metalSoy2 = _interopRequireDefault(_metalSoy);

    var _clayCard = require("frontend-taglib-clay$clay-card");

    var _metalState = require("frontend-js-metal-web$metal-state");

    var _ClayCardGridSoy = require("./ClayCardGrid.soy");

    var _ClayCardGridSoy2 = _interopRequireDefault(_ClayCardGridSoy);

    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;
    }
    /* eslint-disable */

    /* eslint-enable */

    /**
     * Metal ClayCardGrid component.
     * @extends ClayComponent
     */
    var ClayCardGrid = function (_ClayComponent) {
      _inherits(ClayCardGrid, _ClayComponent);

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

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

      _createClass(ClayCardGrid, [{
        key: '_handleItemToggled',

        /**
         * Continues the propagation of the checkbox changed event
         * @param {!Event} event
         * @private
         */
        value: function _handleItemToggled(event) {
          this.emit('itemToggled', event);
        }
      }]);

      return ClayCardGrid;
    }(_clayComponent2.default);

    /**
     * State definition.
     * @static
     * @type {!Object}
     */

    ClayCardGrid.STATE = {
      /**
       * Data to add to the element.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {?object}
       */
      data: _metalState.Config.object(),

      /**
       * Object that wires events with default listeners
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @review
       * @type {?(object|undefined)}
       */
      defaultEventHandler: _metalState.Config.object(),

      /**
       * CSS classes to be applied to the element.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {?(string|undefined)}
       */
      elementClasses: _metalState.Config.string(),

      /**
       * Id to be applied to the element.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {?(string|undefined)}
       */
      id: _metalState.Config.string(),

      /**
       * List of items.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {?(array|undefined)}
       */
      items: _metalState.Config.array(),

      /**
       * Schema mapping list item fields with item data properties.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {!object}
       */
      schema: _metalState.Config.shapeOf({
        contentRenderer: _metalState.Config.string(),
        contentRendererMap: _metalState.Config.object(),
        fieldName: _metalState.Config.string(),
        fieldsMap: _metalState.Config.object(),
        iconsMap: _metalState.Config.object(),
        inputNameField: _metalState.Config.string(),
        inputNamesMap: _metalState.Config.object(),
        inputValueField: _metalState.Config.string(),
        labelStylesMap: _metalState.Config.object(),
        stickerClassesMap: _metalState.Config.object(),
        stickerIconsMap: _metalState.Config.object(),
        stickerImageAltsMap: _metalState.Config.object(),
        stickerImageSrcsMap: _metalState.Config.object(),
        stickerShapesMap: _metalState.Config.object(),
        stickerStylesMap: _metalState.Config.object(),
        userColorsMap: _metalState.Config.object()
      }).required(),

      /**
       * Flag to indicate if the list group items are selectable.
       * @default false
       * @instance
       * @memberof ClayCardGrid
       * @type {?bool}
       */
      selectable: _metalState.Config.bool().value(false),

      /**
       * The path to the SVG spritemap file containing the icons.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {?(string|undefined)}
       */
      spritemap: _metalState.Config.string(),

      /**
       * Header of the list group.
       * @default undefined
       * @instance
       * @memberof ClayCardGrid
       * @type {?(string|undefined)}
       */
      title: _metalState.Config.string()
    };

    (0, _metalWebComponent2.default)('clay-card-grid', ClayCardGrid);

    _metalSoy2.default.register(ClayCardGrid, _ClayCardGridSoy2.default);

    exports.ClayCardGrid = ClayCardGrid;
    exports.default = ClayCardGrid;
    //# sourceMappingURL=ClayCardGrid.js.map
  }
});
//# sourceMappingURL=ClayCardGrid.js.map