import React, { useState } from 'react'; import makeStyles from '@mui/styles/makeStyles'; import AppBar from '@mui/material/AppBar'; import Box from '@mui/material/Box'; import Toolbar from '@mui/material/Toolbar'; import Container from '@mui/material/Container'; import { IconButton, Menu, MenuItem, Typography, Button } from '@mui/material'; import Avatar from '@mui/material/Avatar'; import MenuIcon from '@mui/icons-material/Menu'; import { logout } from '@pega/auth/lib/sdk-auth-manager'; import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps'; import './WssNavBar.css'; interface WssNavBarProps extends PConnProps { // If any, enter additional props that only exist on this component appInfo: any; navLinks: any[]; operator: { currentUserInitials: string }; navDisplayOptions: { alignment: string; position: string }; portalName: string; imageSrc: string; fullImageSrc: string; appName: any; } const useStyles = makeStyles(theme => ({ root: { display: 'flex' }, content: { flexGrow: 1, height: '100vh', marginLeft: theme.spacing(2), marginRight: theme.spacing(2) }, appListLogo: { maxWidth: '100%', height: '3rem' }, appName: { marginLeft: theme.spacing(2), marginRight: theme.spacing(4), fontSize: '1.5rem' } })); export default function WssNavBar(props: WssNavBarProps) { const { appInfo, navLinks, operator, navDisplayOptions } = props; const { alignment, position } = navDisplayOptions; const classes = useStyles(); const [anchorElNav, setAnchorElNav] = useState(null); const [anchorElUser, setAnchorElUser] = useState(null); const localizedVal = PCore.getLocaleUtils().getLocaleValue; const localeCategory = 'AppShell'; const handleOpenNavMenu = (event: React.MouseEvent) => { setAnchorElNav(event.currentTarget); }; const handleOpenUserMenu = (event: React.MouseEvent) => { setAnchorElUser(event.currentTarget); }; const handleCloseNavMenu = () => { setAnchorElNav(null); }; const handleCloseUserMenu = () => { setAnchorElUser(null); }; const navLinksContent = ( {navLinks.map(link => ( ))} ); return ( ); }