import { Menu,MenuItem } from '@mui/material';
import {  useNavigate} from "react-router-dom";

export function MenuMovil(props) {

    const navigate = useNavigate()

    let {onClose : handleCloseMov, anchorEl, open, out } =  props;

    return(
        <Menu
            id="basic-menu"
            anchorEl={anchorEl}
            open={open}
            onClose={handleCloseMov}
            MenuListProps={{ 'aria-labelledby': 'basic-button' }}>
            <MenuItem onClick={() => navigate('/')}>Home</MenuItem>
            <MenuItem onClick={ () => navigate('perfil') }>Perfil</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={handleCloseMov}>Shit</MenuItem>
            <MenuItem onClick={out}>Logout</MenuItem>
        </Menu>
    )
}

