

export default function UserCard({ user, onSubmit, doShowControls, control }) {
    return (
        <div className="glassmorphism flex items-center justify-between p-2">
            <div className="flex items-center gap-4">
                <img src={user.picture || '/default-profile.png'} alt={`${user.username}'s profile`} className="w-10 h-10 rounded-full mr-2" />
                <span className="text-white text-lg font-montserrat font-semibold">{user.username}</span>
            </div>
            {doShowControls && (

                <div className="flex items-center gap-2" onClick={(e) => {
                    onSubmit(user);
                }}>
                    {control}
                </div>
            )}
        </div>
    );
}