import React from 'react';
import DropdownContentList, { DropdownSectionedContentList } from './dropdown-content-list';
import DropdownMenuMultiLevelList from './dropdown-menu-multi-level-list';
import { jsx as _jsx } from "react/jsx-runtime";
const DropdownList = ({
  options,
  onCloseDropdown,
  selectedKey,
  selectedItem,
  onSelect,
  contentTestId,
  contentClassName,
  isMultiLevel = false,
  isMultiLevelSectioned = false,
  isSectioned = false,
  labelledBy,
  LinkComponent
}) => {
  if (isMultiLevel || isMultiLevelSectioned) {
    return /*#__PURE__*/_jsx(DropdownMenuMultiLevelList, {
      closeDropdown: onCloseDropdown,
      selectedOption: selectedItem,
      options: options,
      onSelect: onSelect,
      contentTestId: contentTestId,
      contentClassName: contentClassName,
      isMultiLevelSectioned: isMultiLevelSectioned,
      LinkComponent: LinkComponent
    });
  }
  const PlainDropdownList = isSectioned ? DropdownSectionedContentList : DropdownContentList;
  return /*#__PURE__*/_jsx(PlainDropdownList, {
    options: options,
    onCloseDropdown: onCloseDropdown,
    selectedKey: selectedKey,
    onSelect: onSelect,
    contentTestId: contentTestId,
    contentClassName: contentClassName,
    labelledBy: labelledBy,
    LinkComponent: LinkComponent
  });
};
export default DropdownList;