import{jsx as t,Fragment as o}from"react/jsx-runtime";import{memo as l,useCallback as a}from"react";import{ContentItem as d}from"../ContentItem/index.js";import{VirtualList as s}from"./VirtualList.js";import{isRenderableMenuItem as u}from"../../utils/menu.js";function c({items:r,routingBasePath:n}){const m=a(e=>t(d,{item:e,routingBasePath:n,children:e.items.length>0&&t(s,{items:e.items,renderItem:m,routingBasePath:n})},e.id),[n]);if(!r.length)return null;const i=r.length>15&&r.every(e=>u(e));return t(o,{children:i?t(s,{items:r,renderItem:m,routingBasePath:n}):t(o,{children:r.map(m)})})}const x=l(c);export{x as Items};
