import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import 'core-js/modules/es.symbol.js';
import 'core-js/modules/es.array.concat.js';
import 'core-js/modules/es.array.filter.js';
import 'core-js/modules/es.array.find-index.js';
import 'core-js/modules/es.array.includes.js';
import 'core-js/modules/es.object.get-own-property-descriptor.js';
import 'core-js/modules/es.object.get-own-property-descriptors.js';
import 'core-js/modules/es.object.keys.js';
import 'core-js/modules/es.object.to-string.js';
import 'core-js/modules/es.string.includes.js';
import 'core-js/modules/web.dom-collections.for-each.js';
import React__default, { useMemo, useState, useRef, useCallback, useEffect } from 'react';
import { SkeletonText, Checkbox } from '@carbon/react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import { VariableSizeList } from 'react-window';
import { settings } from '../../../constants/Settings.js';
import ListItem from '../ListItem/ListItem.js';
import EmptyState from '../../EmptyState/EmptyState.js';
import Button from '../../Button/Button.js';
import { EditingStyle, editingStyleIsMultiple } from '../../../utils/DragAndDropUtils.js';
import { ListItemPropTypes } from '../ListPropTypes.js';
import { useResize } from '../../../internal/UseResizeObserver.js';
import { HtmlElementRefProp } from '../../../constants/SharedPropTypes.js';
import { ITEM_HEIGHT_LARGE, ITEM_HEIGHT, ITEM_LEVEL_OFFSET, ITEM_COLUMN_GAP } from './listConstants.js';

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var iotPrefix = settings.iotPrefix;
var propTypes = {
  /** content shown if list is empty */
  emptyState: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
  /** content shown if list is empty on search */
  emptySearchState: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
  /** i18n strings */
  i18n: PropTypes.shape({
    searchPlaceHolderText: PropTypes.string,
    expand: PropTypes.string,
    close: PropTypes.string,
    loadMore: PropTypes.string
  }),
  /** data source of list items */
  items: PropTypes.arrayOf(PropTypes.shape(ListItemPropTypes)),
  /** if true shows empty search state, instead of empty state, when there are no search results */
  isFiltering: PropTypes.bool,
  /** use full height in list */
  // eslint-disable-next-line consistent-return
  isFullHeight: function isFullHeight(props, propName, componentName) {
    {
      /* istanbul ignore else */
      if (props[propName] === true) {
        return new Error("".concat(componentName, ": Using '").concat(propName, "' with 'isVirtualList' could have negative performance consequences. Using the them together is discouraged."));
      }
    }
  },
  /** use large/fat row in list */
  isLargeRow: PropTypes.bool,
  /** optional skeleton to be rendered while loading data */
  isLoading: PropTypes.bool,
  /** true if the list should have multiple selectable rows using checkboxes */
  isCheckboxMultiSelect: PropTypes.bool,
  testId: PropTypes.string,
  /** Multiple currently selected items */
  selectedIds: PropTypes.arrayOf(PropTypes.string),
  /** ids of row expanded */
  expandedIds: PropTypes.arrayOf(PropTypes.string),
  /** callback used to limit which items that should get drop targets rendered.
   * receives the id of the item that is being dragged and returns a list of ids. */
  getAllowedDropIds: PropTypes.func,
  /** call back function of select */
  handleSelect: PropTypes.func,
  /** call back function of expansion */
  toggleExpansion: PropTypes.func,
  /** callback function for reorder */
  onItemMoved: PropTypes.func,
  /** callback function when reorder will occur - can cancel the move by returning false */
  itemWillMove: PropTypes.func,
  /** call back function for when load more row is clicked  (rowId) => {} */
  handleLoadMore: PropTypes.func,
  /** ids of selectable rows with indeterminate selection state */
  indeterminateIds: PropTypes.arrayOf(PropTypes.string),
  /** RowIds for rows currently loading more child rows */
  loadingMoreIds: PropTypes.arrayOf(PropTypes.string),
  /** the ids of locked items that cannot be reordered */
  lockedIds: PropTypes.arrayOf(PropTypes.string),
  /** list editing style */
  editingStyle: PropTypes.oneOf([EditingStyle.Single, EditingStyle.Multiple, EditingStyle.SingleNesting, EditingStyle.MultipleNesting]),
  /** icon can be left or right side of list row primary value */
  iconPosition: PropTypes.oneOf(['left', 'right']),
  virtualListRef: HtmlElementRefProp
};
var defaultProps = {
  editingStyle: null,
  emptyState: 'No list items to show',
  emptySearchState: 'No results found',
  expandedIds: [],
  getAllowedDropIds: null,
  handleLoadMore: function handleLoadMore() {},
  handleSelect: function handleSelect() {},
  i18n: {
    searchPlaceHolderText: 'Enter a value',
    expand: 'Expand',
    close: 'Close',
    loadMore: 'View more...'
  },
  iconPosition: 'left',
  isFiltering: false,
  isFullHeight: false,
  isLargeRow: false,
  isLoading: false,
  isCheckboxMultiSelect: false,
  items: [],
  itemWillMove: function itemWillMove() {
    return true;
  },
  indeterminateIds: [],
  loadingMoreIds: [],
  lockedIds: [],
  onItemMoved: function onItemMoved() {},
  selectedIds: [],
  testId: 'list',
  toggleExpansion: function toggleExpansion() {},
  virtualListRef: undefined
};
var getAdjustedNestingLevel = function getAdjustedNestingLevel(items, currentLevel) {
  return items.some(function (item) {
    return (item === null || item === void 0 ? void 0 : item.children) && item.children.length > 0;
  }) ? currentLevel + 1 : currentLevel;
};
var VirtualListContent = function VirtualListContent(_ref) {
  var editingStyle = _ref.editingStyle,
    emptyState = _ref.emptyState,
    emptySearchState = _ref.emptySearchState,
    expandedIds = _ref.expandedIds,
    handleLoadMore = _ref.handleLoadMore,
    handleSelect = _ref.handleSelect,
    i18n = _ref.i18n,
    iconPosition = _ref.iconPosition,
    indeterminateIds = _ref.indeterminateIds,
    isFiltering = _ref.isFiltering,
    isFullHeight = _ref.isFullHeight,
    isLargeRow = _ref.isLargeRow,
    isLoading = _ref.isLoading,
    isCheckboxMultiSelect = _ref.isCheckboxMultiSelect,
    items = _ref.items,
    itemWillMove = _ref.itemWillMove,
    getAllowedDropIds = _ref.getAllowedDropIds,
    loadingMoreIds = _ref.loadingMoreIds,
    lockedIds = _ref.lockedIds,
    onItemMoved = _ref.onItemMoved,
    selectedIds = _ref.selectedIds,
    testId = _ref.testId,
    toggleExpansion = _ref.toggleExpansion,
    virtualListRefProp = _ref.virtualListRef;
  var mergedI18n = useMemo(function () {
    return _objectSpread(_objectSpread({}, defaultProps.i18n), i18n);
  }, [i18n]);
  var rowSize = isLargeRow ? ITEM_HEIGHT_LARGE : ITEM_HEIGHT;
  var _useState = useState(0),
    _useState2 = _slicedToArray(_useState, 2),
    listHeight = _useState2[0],
    setListHeight = _useState2[1];
  var listOuterRef = useResize(useRef(null));
  var didScrollRef = useRef(false);
  var internalVirtualListRef = useRef(null);
  var virtualListRef = virtualListRefProp || internalVirtualListRef;
  var renderLoadMore = function renderLoadMore(item, isLoadingMore, level, style) {
    var indentation = "".concat(level * ITEM_LEVEL_OFFSET - ITEM_COLUMN_GAP, "px");
    return isLoadingMore ? /*#__PURE__*/React__default.createElement("div", {
      style: style,
      key: "".concat(item.id, "-list-item-load-more"),
      className: "".concat(iotPrefix, "--list-item")
    }, /*#__PURE__*/React__default.createElement("div", {
      style: {
        width: indentation
      }
    }), /*#__PURE__*/React__default.createElement(SkeletonText, {
      className: "".concat(iotPrefix, "--list--load-more-skeleton"),
      width: "30%",
      "data-testid": "".concat(testId, "-loading-more")
    })) : /*#__PURE__*/React__default.createElement(Button, {
      key: "".concat(item.id, "-list-item-load-more"),
      className: "".concat(iotPrefix, "--list-item ").concat(iotPrefix, "--load-more-row"),
      onClick: function onClick() {
        return handleLoadMore(item.id);
      },
      "data-testid": "".concat(testId, "-").concat(item.id, "-load-more"),
      kind: "ghost",
      style: style
    }, /*#__PURE__*/React__default.createElement("div", {
      style: {
        width: indentation
      }
    }), /*#__PURE__*/React__default.createElement("div", {
      className: "".concat(iotPrefix, "--load-more-row--content")
    }, mergedI18n.loadMore));
  };
  var flatten = useCallback(function (initialItems) {
    var parentId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
    var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
    return initialItems.reduce(function (carry, item) {
      var tmp = carry;
      var isExpanded = expandedIds.filter(function (rowId) {
        return rowId === item.id;
      }).length > 0;
      var parentIsExpanded = expandedIds.some(function (rowId) {
        return parentId === rowId;
      });
      if (parentId === null || isExpanded || parentIsExpanded) {
        tmp = carry.concat(_objectSpread(_objectSpread({}, item), {}, {
          parentId: parentId,
          level: currentLevel
        }));
      }
      if (isExpanded && item.children) {
        tmp = tmp.concat(flatten(item.children, item.id, currentLevel + 1));
        if (item.hasLoadMore && isExpanded) {
          tmp = tmp.concat([_objectSpread(_objectSpread({}, item), {}, {
            parentId: item.id,
            level: currentLevel,
            isLoadMoreRow: true
          })]);
        }
      }
      if (!item.children && item.hasLoadMore) {
        tmp = tmp.concat([_objectSpread(_objectSpread({}, item), {}, {
          level: currentLevel,
          isLoadMoreRow: true
        })]);
      }
      return tmp;
    }, []);
  }, [expandedIds]);
  var flattenHelper = useCallback(function () {
    var flattenedItems = flatten(items);
    var parents = flattenedItems.filter(function (item) {
      return item.level === 0 || expandedIds.includes(item.id) || expandedIds.includes(item.parentId);
    }).length;
    return {
      flattenedItems: flattenedItems,
      parents: parents
    };
  }, [expandedIds, flatten, items]);
  var _useState3 = useState(function () {
      var _flattenHelper = flattenHelper(),
        flattenedItems = _flattenHelper.flattenedItems,
        parents = _flattenHelper.parents;
      return {
        items: flattenedItems,
        parents: parents,
        height: parents * rowSize
      };
    }),
    _useState4 = _slicedToArray(_useState3, 2),
    flattened = _useState4[0],
    setFlattened = _useState4[1];
  useEffect(function () {
    if (virtualListRef.current) {
      virtualListRef.current.resetAfterIndex(0);
    }
  }, [expandedIds, flattened, virtualListRef, rowSize]);
  useEffect(function () {
    var _flattenHelper2 = flattenHelper(),
      flattenedItems = _flattenHelper2.flattenedItems,
      parents = _flattenHelper2.parents;
    setFlattened({
      items: flattenedItems,
      parents: parents,
      height: parents * rowSize
    });
  }, [flattenHelper, rowSize]);
  var renderItemAndChildren = function renderItemAndChildren(item, index, parentId, level, style) {
    var hasChildren = (item === null || item === void 0 ? void 0 : item.children) && item.children.length > 0;
    var isSelected = selectedIds.some(function (id) {
      return item.id === id;
    });
    var isExpanded = expandedIds.filter(function (rowId) {
      return rowId === item.id;
    }).length > 0;
    var isLoadingMore = loadingMoreIds.includes(item.id);
    var isLocked = lockedIds.includes(item.id);
    var isIndeterminate = indeterminateIds.includes(item.id);
    var parentIsExpanded = expandedIds.filter(function (rowId) {
      return rowId === item.parentId;
    }).length > 0;
    var _item$content = item.content,
      value = _item$content.value,
      secondaryValue = _item$content.secondaryValue,
      icon = _item$content.icon,
      rowActions = _item$content.rowActions,
      tags = _item$content.tags,
      isSelectable = item.isSelectable,
      isCategory = item.isCategory,
      disabled = item.disabled;
    if (item.isLoadMoreRow) {
      if (parentIsExpanded || item.level === 0) {
        var loadMoreLevel = parentIsExpanded ? level + 1 : level;
        return renderLoadMore(item, isLoadingMore, loadMoreLevel, style);
      }
      return null;
    }
    return [/*#__PURE__*/React__default.createElement("div", {
      key: "".concat(item.id, "-list-item-parent-").concat(level, "-").concat(value),
      className: "".concat(iotPrefix, "--list-item-parent"),
      style: style
    }, /*#__PURE__*/React__default.createElement(ListItem, {
      id: item.id,
      index: index,
      key: "".concat(item.id, "-list-item-").concat(level, "-").concat(value),
      nestingLevel: item !== null && item !== void 0 && item.children && item.children.length > 0 ? level - 1 : level,
      value: value,
      icon: editingStyleIsMultiple(editingStyle) || isSelectable && isCheckboxMultiSelect ? /*#__PURE__*/React__default.createElement(Checkbox, {
        id: "".concat(item.id, "-checkbox"),
        name: item.value,
        "data-testid": "".concat(item.id, "-checkbox"),
        labelText: "",
        onChange: function onChange() {
          return handleSelect(item.id, parentId);
        },
        onClick: function onClick(event) {
          // This is needed as a workaround for a carbon checkbox bug
          // https://github.com/carbon-design-system/carbon/issues/10122#issuecomment-984692702
          event.stopPropagation();
        },
        checked: isSelected,
        disabled: disabled || isLocked,
        indeterminate: isIndeterminate
      }) : icon,
      disabled: disabled,
      iconPosition: iconPosition,
      editingStyle: isLocked ? null : editingStyle,
      secondaryValue: secondaryValue,
      rowActions: rowActions,
      onSelect: function onSelect() {
        return handleSelect(item.id, parentId);
      },
      onExpand: toggleExpansion,
      onItemMoved: onItemMoved,
      itemWillMove: itemWillMove,
      getAllowedDropIds: getAllowedDropIds,
      selected: isSelected,
      expanded: isExpanded,
      isExpandable: hasChildren,
      isLargeRow: isLargeRow,
      isLocked: isLocked,
      isCategory: isCategory,
      isSelectable: editingStyle === null && isSelectable,
      i18n: mergedI18n,
      tags: tags,
      preventRowFocus: isCheckboxMultiSelect
    }))];
  };
  var getItemSize = function getItemSize(index) {
    var _flattened$items;
    var item = flattened === null || flattened === void 0 || (_flattened$items = flattened.items) === null || _flattened$items === void 0 ? void 0 : _flattened$items[index];
    if (!item) {
      return 0;
    }
    var isExpanded = expandedIds.filter(function (rowId) {
      return rowId === item.parentId;
    }).length > 0;
    if (item.isLoadMoreRow && (isExpanded || item.level === 0)) {
      return ITEM_HEIGHT;
    }
    if (!item.parentId || isExpanded) {
      return rowSize;
    }
    return 0;
  };

  // eslint-disable-next-line react/prop-types
  var ListRow = function ListRow(_ref2) {
    var _flattened$items2;
    var index = _ref2.index,
      style = _ref2.style;
    var item = flattened === null || flattened === void 0 || (_flattened$items2 = flattened.items) === null || _flattened$items2 === void 0 ? void 0 : _flattened$items2[index];
    if (!item || !(item !== null && item !== void 0 && item.content)) {
      return null;
    }
    var isExpanded = expandedIds.filter(function (rowId) {
      return rowId === item.id || rowId === item.parentId;
    }).length > 0;
    if (item.parentId && !isExpanded) {
      return null;
    }
    return renderItemAndChildren(item, index, item.parentId, getAdjustedNestingLevel(items, item.level), style);
  };
  var renderEmptyContent = function renderEmptyContent() {
    var emptyContent = isFiltering ? emptySearchState : emptyState;
    return typeof emptyContent === 'string' ? /*#__PURE__*/React__default.createElement("div", {
      className: classnames("".concat(iotPrefix, "--list--empty-state"), _defineProperty({}, "".concat(iotPrefix, "--list--empty-state__full-height"), isFullHeight))
    }, /*#__PURE__*/React__default.createElement(EmptyState, {
      icon: isFiltering ? 'no-result' : 'empty',
      title: emptyContent,
      body: ""
    })) : emptyContent;
  };
  var handleItemsRendered = useCallback(function () {
    var parentList = listOuterRef.current.closest(".".concat(iotPrefix, "--list"));
    if (parentList) {
      var rect = parentList.getBoundingClientRect();
      var height = rect.height;
      setListHeight(height);
    }
    if (didScrollRef.current === false && (selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) > 0 && virtualListRef.current) {
      var selectedIndex = flattened.items.findIndex(function (item) {
        return item.id === selectedIds[0];
      });
      if (selectedIndex >= 0) {
        virtualListRef.current.scrollToItem(selectedIndex, 'start');
        didScrollRef.current = true;
      }
    }
  }, [flattened.items, listOuterRef, selectedIds, virtualListRef]);
  if (!isLoading && flattened.items.length) {
    return /*#__PURE__*/React__default.createElement(VariableSizeList, {
      ref: virtualListRef,
      itemCount: flattened.items.length,
      height: isFullHeight ? flattened.height : Math.min(listHeight, flattened.height),
      itemSize: getItemSize,
      className: classnames("".concat(iotPrefix, "--list--content"), "".concat(iotPrefix, "--list--content--virtual"), _defineProperty({}, "".concat(iotPrefix, "--list--content__full-height"), isFullHeight)),
      outerRef: listOuterRef,
      style: {
        overflow: isFullHeight ? 'unset' : 'auto'
      },
      onItemsRendered: handleItemsRendered
    }, ListRow);
  }
  return /*#__PURE__*/React__default.createElement("div", {
    className: classnames(_defineProperty({}, "".concat(iotPrefix, "--list--content__full-height"), isFullHeight), "".concat(iotPrefix, "--list--content"))
  }, isLoading ? /*#__PURE__*/React__default.createElement(SkeletonText, {
    className: "".concat(iotPrefix, "--list--skeleton"),
    width: "90%",
    "data-testid": "".concat(testId, "-loading")
  }) : renderEmptyContent());
};
VirtualListContent.propTypes = propTypes;
VirtualListContent.defaultProps = defaultProps;
VirtualListContent.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "VirtualListContent",
  "props": {
    "editingStyle": {
      "defaultValue": {
        "value": "null",
        "computed": false
      },
      "description": "list editing style",
      "type": {
        "name": "enum",
        "value": [{
          "value": "EditingStyle.Single",
          "computed": true
        }, {
          "value": "EditingStyle.Multiple",
          "computed": true
        }, {
          "value": "EditingStyle.SingleNesting",
          "computed": true
        }, {
          "value": "EditingStyle.MultipleNesting",
          "computed": true
        }]
      },
      "required": false
    },
    "emptyState": {
      "defaultValue": {
        "value": "'No list items to show'",
        "computed": false
      },
      "description": "content shown if list is empty",
      "type": {
        "name": "union",
        "value": [{
          "name": "node"
        }, {
          "name": "string"
        }]
      },
      "required": false
    },
    "emptySearchState": {
      "defaultValue": {
        "value": "'No results found'",
        "computed": false
      },
      "description": "content shown if list is empty on search",
      "type": {
        "name": "union",
        "value": [{
          "name": "node"
        }, {
          "name": "string"
        }]
      },
      "required": false
    },
    "expandedIds": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "description": "ids of row expanded",
      "type": {
        "name": "arrayOf",
        "value": {
          "name": "string"
        }
      },
      "required": false
    },
    "getAllowedDropIds": {
      "defaultValue": {
        "value": "null",
        "computed": false
      },
      "description": "callback used to limit which items that should get drop targets rendered.\nreceives the id of the item that is being dragged and returns a list of ids.",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "handleLoadMore": {
      "defaultValue": {
        "value": "() => {}",
        "computed": false
      },
      "description": "call back function for when load more row is clicked  (rowId) => {}",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "handleSelect": {
      "defaultValue": {
        "value": "() => {}",
        "computed": false
      },
      "description": "call back function of select",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "i18n": {
      "defaultValue": {
        "value": "{\n  searchPlaceHolderText: 'Enter a value',\n  expand: 'Expand',\n  close: 'Close',\n  loadMore: 'View more...',\n}",
        "computed": false
      },
      "description": "i18n strings",
      "type": {
        "name": "shape",
        "value": {
          "searchPlaceHolderText": {
            "name": "string",
            "required": false
          },
          "expand": {
            "name": "string",
            "required": false
          },
          "close": {
            "name": "string",
            "required": false
          },
          "loadMore": {
            "name": "string",
            "required": false
          }
        }
      },
      "required": false
    },
    "iconPosition": {
      "defaultValue": {
        "value": "'left'",
        "computed": false
      },
      "description": "icon can be left or right side of list row primary value",
      "type": {
        "name": "enum",
        "value": [{
          "value": "'left'",
          "computed": false
        }, {
          "value": "'right'",
          "computed": false
        }]
      },
      "required": false
    },
    "isFiltering": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "if true shows empty search state, instead of empty state, when there are no search results",
      "type": {
        "name": "bool"
      },
      "required": false
    },
    "isFullHeight": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "use full height in list",
      "type": {
        "name": "custom",
        "raw": "(props, propName, componentName) => {\n  if (__DEV__) {\n    /* istanbul ignore else */\n    if (props[propName] === true) {\n      return new Error(\n        `${componentName}: Using '${propName}' with 'isVirtualList' could have negative performance consequences. Using the them together is discouraged.`\n      );\n    }\n  }\n}"
      },
      "required": false
    },
    "isLargeRow": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "use large/fat row in list",
      "type": {
        "name": "bool"
      },
      "required": false
    },
    "isLoading": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "optional skeleton to be rendered while loading data",
      "type": {
        "name": "bool"
      },
      "required": false
    },
    "isCheckboxMultiSelect": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "true if the list should have multiple selectable rows using checkboxes",
      "type": {
        "name": "bool"
      },
      "required": false
    },
    "items": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "description": "data source of list items",
      "type": {
        "name": "arrayOf",
        "value": {
          "name": "shape",
          "value": "import { ListItemPropTypes } from '../ListPropTypes';",
          "computed": true
        }
      },
      "required": false
    },
    "itemWillMove": {
      "defaultValue": {
        "value": "() => {\n  return true;\n}",
        "computed": false
      },
      "description": "callback function when reorder will occur - can cancel the move by returning false",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "indeterminateIds": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "description": "ids of selectable rows with indeterminate selection state",
      "type": {
        "name": "arrayOf",
        "value": {
          "name": "string"
        }
      },
      "required": false
    },
    "loadingMoreIds": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "description": "RowIds for rows currently loading more child rows",
      "type": {
        "name": "arrayOf",
        "value": {
          "name": "string"
        }
      },
      "required": false
    },
    "lockedIds": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "description": "the ids of locked items that cannot be reordered",
      "type": {
        "name": "arrayOf",
        "value": {
          "name": "string"
        }
      },
      "required": false
    },
    "onItemMoved": {
      "defaultValue": {
        "value": "() => {}",
        "computed": false
      },
      "description": "callback function for reorder",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "selectedIds": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "description": "Multiple currently selected items",
      "type": {
        "name": "arrayOf",
        "value": {
          "name": "string"
        }
      },
      "required": false
    },
    "testId": {
      "defaultValue": {
        "value": "'list'",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    },
    "toggleExpansion": {
      "defaultValue": {
        "value": "() => {}",
        "computed": false
      },
      "description": "call back function of expansion",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "virtualListRef": {
      "defaultValue": {
        "value": "undefined",
        "computed": true
      },
      "description": "",
      "type": {
        "name": "custom",
        "raw": "HtmlElementRefProp"
      },
      "required": false
    }
  }
};
var VirtualListContent$1 = VirtualListContent;

export { VirtualListContent$1 as default };
