import Button from '../ui/Button';

type Props = {
  user: string;
  onLogout: () => void;
};

export default function AuthStatus({ user, onLogout }: Props) {
  return (
    <div className="authStatus">
      <div className="authStatus__user" aria-label="Zalogowany użytkownik">
        <div className="authStatus__userLabel">Zalogowany</div>
        <div className="authStatus__userName">{user}</div>
      </div>
      <Button size="sm" variant="ghost" type="button" onClick={onLogout}>
        Wyloguj
      </Button>
    </div>
  );
}
