var _excluded = ["virtual", "onTopRefresh", "onBottomRefresh", "allowClear", "multiple", "value", "onChange", "onScroll", "wrapper", "layout", "checkable", "checkbox", "checkboxProps", "checkboxPosition", "prepend", "list", "append", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React, { forwardRef } from 'react';
import List from "./../../List";

// 内库使用-start
import Layout from "./../../../Layout";
// 内库使用-end

/* 测试使用-start
import { Layout } from 'seedsui-react'
测试使用-end */

// 列表
var Main = /*#__PURE__*/forwardRef(function (_ref, ref) {
  var virtual = _ref.virtual,
    onTopRefresh = _ref.onTopRefresh,
    onBottomRefresh = _ref.onBottomRefresh,
    allowClear = _ref.allowClear,
    multiple = _ref.multiple,
    value = _ref.value,
    onChange = _ref.onChange,
    onScroll = _ref.onScroll,
    wrapper = _ref.wrapper,
    layout = _ref.layout,
    checkable = _ref.checkable,
    checkbox = _ref.checkbox,
    checkboxProps = _ref.checkboxProps,
    checkboxPosition = _ref.checkboxPosition,
    prepend = _ref.prepend,
    list = _ref.list,
    append = _ref.append,
    children = _ref.children,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(Layout.Main, _extends({}, props, {
    ref: ref,
    className: "list-main".concat(props.className ? ' ' + props.className : ''),
    onTopRefresh: onTopRefresh,
    onBottomRefresh: onBottomRefresh,
    onScroll: onScroll
  }), typeof prepend === 'function' ? prepend({
    list: list,
    value: value,
    onChange: onChange
  }) : null, Array.isArray(list) && list.length && /*#__PURE__*/React.createElement(List, {
    allowClear: allowClear,
    multiple: multiple,
    value: value,
    list: list,
    onChange: onChange
    // List config
    ,
    wrapper: wrapper,
    layout: layout,
    checkable: checkable,
    checkbox: checkbox,
    checkboxProps: checkboxProps,
    checkboxPosition: checkboxPosition
  }), typeof append === 'function' ? append({
    list: list,
    value: value,
    onChange: onChange
  }) : null, children);
});
export default Main;