Liferay.Loader.define("frontend-js-components-web@1.0.27/treeview/NodeList", ['module', 'exports', 'require', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react', './NodeListItem'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = NodeList;

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _NodeListItem = _interopRequireDefault(require("./NodeListItem"));

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

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    function NodeList(_ref) {
      var NodeComponent = _ref.NodeComponent,
          nodes = _ref.nodes,
          _onBlur = _ref.onBlur,
          _onFocus = _ref.onFocus,
          _onMouseDown = _ref.onMouseDown,
          _ref$role = _ref.role,
          role = _ref$role === void 0 ? 'group' : _ref$role,
          _ref$tabIndex = _ref.tabIndex,
          tabIndex = _ref$tabIndex === void 0 ? -1 : _ref$tabIndex;
      var rootNodeId = nodes[0] && nodes[0].id;

      if (!rootNodeId) {
        // All nodes have been filtered.
        return null;
      }

      return (/*#__PURE__*/_react.default.createElement("div", {
          className: "lfr-treeview-node-list",
          onBlur: function onBlur() {
            if (_onBlur) {
              _onBlur();
            }
          },
          onFocus: function onFocus(event) {
            if (_onFocus) {
              _onFocus(event);
            }
          },
          onMouseDown: function onMouseDown(event) {
            if (_onMouseDown) {
              _onMouseDown(event);
            }
          },
          role: role,
          tabIndex: tabIndex
        }, nodes.map(function (node) {
          return (/*#__PURE__*/_react.default.createElement(_NodeListItem.default, {
              NodeComponent: NodeComponent,
              key: node.id,
              node: node
            })
          );
        }))
      );
    }
    //# sourceMappingURL=NodeList.js.map
  }
});
//# sourceMappingURL=NodeList.js.map