import {TextVariant} from '@components/Text';
import {AvatarSize} from '@components/Image/components/Avatar/interfaces';

export const getTextVariant = (
  size: AvatarSize,
): {nameVariant: TextVariant; detailVariant: TextVariant} => {
  switch (size) {
    case '5xl':
      return {
        nameVariant: 'h1',
        detailVariant: 'h2',
      };
    case '4xl':
      return {
        nameVariant: 'h2',
        detailVariant: 'h3',
      };
    case 'xxxl':
      return {
        nameVariant: 'h3',
        detailVariant: 'h4',
      };
    case 'xxl':
      return {
        nameVariant: 'h4',
        detailVariant: 'h5',
      };
    case 'xl':
      return {
        nameVariant: 'h5',
        detailVariant: 'h6',
      };
    case 'lg':
      return {
        nameVariant: 'subtitle1',
        detailVariant: 'subtitle2',
      };
    case 'md':
      return {
        nameVariant: 'subtitle1',
        detailVariant: 'subtitle2',
      };
    case 'sm':
      return {
        nameVariant: 'subtitle2',
        detailVariant: 'caption',
      };
    case 'xs':
    default:
      return {
        nameVariant: 'caption',
        detailVariant: 'caption',
      };
  }
};
