import { Typography } from '@mui/material';
import { UserCardProps, User } from '../types';
import { renderAvatar } from '../components';

// 详细卡片模式下的NameOnly渲染组件
function NameOnlyCard(props: Omit<UserCardProps, 'user'> & { user: User }) {
  const { user, avatarSize = 48, onAvatarClick } = props;

  return (
    <>
      {renderAvatar(user, avatarSize, props.avatarProps, onAvatarClick)}
      <Typography variant="body1">{user.fullName || user.email || user.did}</Typography>
    </>
  );
}

export default NameOnlyCard;
