"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "VirtualListBase", {
  enumerable: true,
  get: function get() {
    return _VirtualListBase.VirtualListBase;
  }
});
Object.defineProperty(exports, "VirtualListBaseNative", {
  enumerable: true,
  get: function get() {
    return _VirtualListBase.VirtualListBaseNative;
  }
});
exports.VirtualListNative = exports.VirtualList = exports.VirtualGridListNative = exports.VirtualGridList = exports.default = void 0;

var _VirtualList = require("@enact/ui/VirtualList");

var _kind = _interopRequireDefault(require("@enact/core/kind"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _react = _interopRequireDefault(require("react"));

var _VirtualListBase = require("./VirtualListBase");

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

/**
 * Provides Moonstone-themed virtual list components and behaviors.
 *
 * @module moonstone/VirtualList
 * @exports VirtualGridList
 * @exports VirtualGridListNative
 * @exports VirtualList
 * @exports VirtualListBase
 * @exports VirtualListBaseNative
 * @exports VirtualListNative
 */

/**
 * A Moonstone-styled scrollable and spottable virtual list component.
 *
 * @class VirtualList
 * @memberof moonstone/VirtualList
 * @mixes moonstone/Scrollable.SpotlightContainerDecorator
 * @extends moonstone/VirtualList.VirtualListBase
 * @ui
 * @public
 */
var VirtualList = (0, _kind.default)({
  name: 'VirtualList',
  propTypes:
  /** @lends moonstone/VirtualList.VirtualList.prototype */
  {
    /**
     * Size of an item for the VirtualList; valid value is a number.
     * If the direction for the list is vertical, itemSize means the height of an item.
     * For horizontal, it means the width of an item.
     *
     * Usage:
     * ```
     * <VirtualList itemSize={ri.scale(72)} />
     * ```
     *
     * @type {Number}
     * @required
     * @public
     */
    itemSize: _propTypes.default.number.isRequired
  },
  render: function render(props) {
    return _react.default.createElement(_VirtualListBase.ScrollableVirtualList, props);
  }
});
/**
 * A Moonstone-styled scrollable and spottable virtual grid list component.
 *
 * @class VirtualGridList
 * @memberof moonstone/VirtualList
 * @mixes moonstone/Scrollable.SpotlightContainerDecorator
 * @extends moonstone/VirtualList.VirtualListBase
 * @ui
 * @public
 */

exports.VirtualList = VirtualList;
var VirtualGridList = (0, _kind.default)({
  name: 'VirtualGridList',
  propTypes:
  /** @lends moonstone/VirtualList.VirtualGridList.prototype */
  {
    /**
     * Size of an item for the VirtualGridList; valid value is an object that has `minWidth`
     * and `minHeight` as properties.
     *
     * Usage:
     * ```
     * <VirtualGridList
     * 	itemSize={{
     * 		minWidth: ri.scale(180),
     * 		minHeight: ri.scale(270)
     * 	}}
     * />
     * ```
     *
     * @type {ui/VirtualList.gridListItemSizeShape}
     * @required
     * @public
     */
    itemSize: _VirtualList.gridListItemSizeShape.isRequired
  },
  render: function render(props) {
    return _react.default.createElement(_VirtualListBase.ScrollableVirtualList, props);
  }
});
/**
 * A Moonstone-styled scrollable and spottable virtual native list component.
 * For smooth native scrolling, web engine with below Chromium 61, should be launched
 * with the flag '--enable-blink-features=CSSOMSmoothScroll' to support it.
 * The one with Chromium 61 or above, is launched to support it by default.
 *
 * @class VirtualListNative
 * @memberof moonstone/VirtualList
 * @mixes moonstone/Scrollable.SpotlightContainerDecorator
 * @extends moonstone/VirtualList.VirtualListBaseNative
 * @ui
 * @private
 */

exports.VirtualGridList = VirtualGridList;
var VirtualListNative = (0, _kind.default)({
  name: 'VirtualListNative',
  propTypes:
  /** @lends moonstone/VirtualList.VirtualListNative.prototype */
  {
    /**
     * Size of an item for the VirtualList; valid value is a number.
     * If the direction for the list is vertical, itemSize means the height of an item.
     * For horizontal, it means the width of an item.
     *
     * Usage:
     * ```
     * <VirtualListNative itemSize={ri.scale(72)} />
     * ```
     *
     * @type {Number}
     * @required
     * @public
     */
    itemSize: _propTypes.default.number.isRequired
  },
  render: function render(props) {
    return _react.default.createElement(_VirtualListBase.ScrollableVirtualListNative, props);
  }
});
/**
 * A Moonstone-styled scrollable and spottable virtual grid native list component.
 * For smooth native scrolling, web engine with below Chromium 61, should be launched
 * with the flag '--enable-blink-features=CSSOMSmoothScroll' to support it.
 * The one with Chromium 61 or above, is launched to support it by default.
 *
 * @class VirtualGridListNative
 * @memberof moonstone/VirtualList
 * @mixes moonstone/Scrollable.SpotlightContainerDecorator
 * @extends moonstone/VirtualList.VirtualListBaseNative
 * @ui
 * @private
 */

exports.VirtualListNative = VirtualListNative;
var VirtualGridListNative = (0, _kind.default)({
  name: 'VirtualGridListNative',
  propTypes:
  /** @lends moonstone/VirtualList.VirtualGridListNative.prototype */
  {
    /**
     * Size of an item for the VirtualGridList; valid value is an object that has `minWidth`
     * and `minHeight` as properties.
     *
     * Usage:
     * ```
     * <VirtualGridListNative
     * 	itemSize={{
     * 		minWidth: ri.scale(180),
     * 		minHeight: ri.scale(270)
     * 	}}
     * />
     * ```
     *
     * @type {ui/VirtualList.gridListItemSizeShape}
     * @required
     * @public
     */
    itemSize: _VirtualList.gridListItemSizeShape.isRequired
  },
  render: function render(props) {
    return _react.default.createElement(_VirtualListBase.ScrollableVirtualListNative, props);
  }
});
exports.VirtualGridListNative = VirtualGridListNative;
var _default = VirtualList;
exports.default = _default;