/**
 * @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

'use strict';

const normalizeBadges = require( '../utils/normalizebadges' );

/**
 * Normalizes badged in page configuration
 *
 *		badges: [ premium, badgeFoo, unknownBadge ]
 *
 * to Pug-friendly format with unknown badges filtered out:
 *
 *		[
 *			{ name: 'premium', label: 'Premium feature' },
 *			{ name: 'foo', label: 'A foo page label' }
 *		]
 *
 * @protected
 * @param {Object} data
 * @return {Array.<Object>}
 */
hexo.extend.helper.register( 'normalizeBadges', normalizeBadges );
