var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {
var handleClickExpand = function handleClickExpand() {
setExpanded(true);
// The clicked element received the focus but gets removed from the DOM.
// Let's keep the focus in the component after expanding.
// Moving it to the <ol> or <nav> does not cause any announcement in NVDA.
// By moving it to some link/button at least we have some announcement.
var focusable = listRef.current.querySelector('a[href],button,[tabindex]');
if (focusable) {
focusable.focus();
}
};
// This defends against someone passing weird input, to ensure that if all
// items would be shown anyway, we just show all items without the EllipsisItem
if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {
if (process.env.NODE_ENV !== 'production') {
console.error(['MUI: You have provided an invalid combination of props to the Breadcrumbs.', "itemsAfterCollapse={".concat(itemsAfterCollapse, "} + itemsBeforeCollapse={").concat(itemsBeforeCollapse, "} >= maxItems={").concat(maxItems, "}")].join('\n'));