/****************************************************************************** * Copyright (c) 2026 Contributors to the Eclipse Foundation. * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 *****************************************************************************/ import { FunctionComponent } from 'react'; import { AppBar, Breadcrumbs, IconButton, Link, Toolbar, Typography } from '@mui/material'; import HighlightOffIcon from '@mui/icons-material/HighlightOff'; import { Link as RouterLink, useLocation } from 'react-router-dom'; export interface AdminHeaderProps { routeNames: Record; onClose: () => void; } const BreadcrumbsNav: FunctionComponent<{ routeNames: Record }> = ({ routeNames }) => { const { pathname } = useLocation(); const segments = pathname.split('/').filter(Boolean); return ( Home {segments.map((value, index) => { const to = `/${segments.slice(0, index + 1).join('/')}`; const label = routeNames[to] ?? decodeURIComponent(value); const isLast = index === segments.length - 1; return isLast ? ( {label} ) : ( {label} ); })} ); }; export const AdminHeader: FunctionComponent = ({ routeNames, onClose }) => ( );