function AddBadgeInformation( element, rgActions, item, steamid )
	{
		if( !item.description.market_fee_app )
		{
			return;
		}

		let isTradingCard = false;
		let isFoilCard = false;
		let foundBadge = false;

		for( const tag of item.description.tags )
		{
			if( tag.category === 'cardborder' )
			{
				isFoilCard = tag.internal_name !== 'cardborder_0';
			}
			else if( tag.category === 'item_class' )
			{
				isTradingCard = tag.internal_name === 'item_class_2';
			}
		}

		/**
		 * @param {boolean} foil
		 */
		const CreateLink = ( foil ) =>
			`https://steamcommunity.com/profiles/${steamid}/gamecards/${item.description.market_fee_app}${foil ? '?border=1' : ''}`;

		for( const badge of badgesData )
		{
			if( badge.appid !== item.description.market_fee_app )
			{
				continue;
			}

			const isFoilBadge = badge.border_color > 0;

			if( isTradingCard && isFoilCard !== isFoilBadge )
			{
				continue;
			}

			foundBadge = true;

			const span = document.createElement( 'span' );
			const str = isFoilBadge ? i18n.inventory_badge_foil_level : i18n.inventory_badge_level;
			span.textContent = str.replace( '%level%', badge.level.toString() );

			const link = document.createElement( 'a' );
			link.className = 'btnv6_blue_hoverfade btn_small_thin';
			link.href = CreateLink( isFoilBadge );
			link.append( span );

			element.append( link );
		}

		if( !foundBadge )
		{
			const span = document.createElement( 'span' );
			span.textContent = i18n.inventory_badge_none;

			const link = document.createElement( 'a' );
			link.className = 'btnv6_blue_hoverfade btn_small_thin';
			link.href = CreateLink( isFoilCard );
			link.append( span );

			element.append( link );
		}

		// TODO: This has a race condition when it's called after badge info fetch() as it directly modifies rgActions
		for( let i = 0; i < rgActions.length; i++ )
		{
			if( rgActions[ i ].link.startsWith( 'https://steamcommunity.com/my/gamecards/' ) )
			{
				// Remove the 'View badge progress' button
				rgActions.splice( i, 1 );
				break;
			}
		}
	}
@param {HTMLElement} element
@param {any[]} rgActions
@param {any} item
@param {string} steamid