import { IUser } from '@assets/js-shop/GraphQLInterfaces';
import { translate as _t } from '@assets/js-shop/ShopUtils';

export class UserUtils {
   public static getUserIconLabel(user: IUser): {class: string, text: string} {
      if(user.userIconLabel !== null) {
         if (user.userIconLabel) {
            return {class: 'logged-b2b logged-' + user.userIconLabel.toLowerCase().replace(' ', '-'), text: user.userIconLabel}
         }
      } else if(user.isB2B && _t('userIconModificatorB2B')) {
         return {class: 'logged-b2b', text: _t('userIconModificatorB2B')}
      }

      return { class: '', text: '' };
   }
}
