import logout from '../../images/logout1.png';
import { useState } from 'react';
import { Button, Dialog, DialogTitle, DialogContent, TextField, DialogActions } from '@mui/material';
import { store } from '../../requests/reducers';
import CLogout  from '../../components/LogOutBtn/LogOutBtn';
const Header = ({ children}) => {
    // let burgerState = false;
    // let [menuState, setMenuState] = useState(burgerState);
    // function handleMenu (burgerState) {setMenuState(burgerState) };

    const [open, setOpen] = useState(true);
    const handleClickOpen = () => setOpen(false);
      const handleClose = () => setOpen(true);

            return (
                <header className='headerWrapper'>
                    <div className='navWrapper'>
                         { children}
                        ksdmcksmfckmvscklmck
                        <div className="searchWrapper">asdcascx</div>
                      <Button onClick={handleClickOpen}><img src={logout} className='loginIcon' alt="logoutIcon" />{store.getState().auth.payload?.sub?.login }</Button>
                         <CLogout/> 
                       
          
                    </div>
                   
                {/* <div className={styles.container}>
                    <div className={styles.wrapper}>
                            <Logo />
                            <Burger menuState={menuState} handleMenu = {(isOpen)=> setMenuState(isOpen)}/>
                                        </div>
                        <Menu menuList={menuList} contactsList={contactsList} menuState={ menuState}/>
                </div> */}
             </header>
        );
    };
export default Header;