import React from 'react';
import { UserCardProps, User } from '../types';
import TooltipAvatar from '../Content/tooltip-avatar';

interface AvatarOnlyCardProps extends Omit<UserCardProps, 'user'> {
  user: User;
  renderCardContent: () => React.ReactNode;
  shouldShowHoverCard: boolean;
}

// AvatarOnly卡片组件，处理仅头像模式的渲染
function AvatarOnlyCard(props: AvatarOnlyCardProps) {
  const { user, infoType, avatarSize = 48, shouldShowHoverCard = false, renderCardContent, ...rest } = props;

  // 其他类型使用自定义Tooltip或无Tooltip
  return (
    <TooltipAvatar
      user={user}
      avatarSize={avatarSize}
      shouldShowHoverCard={shouldShowHoverCard}
      renderCardContent={renderCardContent}
      {...rest}
    />
  );
}

export default AvatarOnlyCard;
