import DetailProfile from "@/app/component/DetailProfile";
import UserLogin from "@/components/icons/UserLogin";
import { removeToken } from "@/utils";
import { Button } from "@mui/material";
import { useState } from "react";

function ProfileUser() {
  const [anchorEl, setAnchorEl] = useState(null);

  const handleClick = (event) => setAnchorEl(event.currentTarget);
  const handleClose = () => setAnchorEl(null);

  return (
    <>
      <Button
        variant="text"
        color="primary"
        onClick={handleClick}
        className={`!flex !p-2 !rounded-full transition-all duration-500 !bg-[#EFEFEF]`}
      >
        <UserLogin />
      </Button>
      <DetailProfile anchorEl={anchorEl} setAnchorEl={setAnchorEl} />
    </>
  );
}

export default ProfileUser;
