import { useState } from "react";
import SearchAppBar from "../AppBar/AppBar";
import ChatList from "../ChatList/ChatList";
import UserMenu from "../Drawer/UserMenu";

import { AsideWrap } from "./Aside.style";


export const Aside = () => {
	const [isOpen, setOpen] = useState(false);
	
	return (
		<AsideWrap>
			<SearchAppBar openUserMenu={() => setOpen(true)}/>
			<ChatList/>
			<UserMenu open={isOpen} closeUserMenu={() => setOpen(false)}/>
		</AsideWrap>
	)
}