<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
<?php
$stat_key   = isset( $stat_key ) ? sanitize_key( (string) $stat_key ) : '';
$stat_label = isset( $stat_label ) ? (string) $stat_label : '';
$stat_value = isset( $stat_value ) ? (string) $stat_value : '0';
$stat_help  = isset( $stat_help ) ? (string) $stat_help : '';
$stat_tone  = isset( $stat_tone ) ? sanitize_html_class( (string) $stat_tone ) : 'neutral';
?>
<article class="ugcify-portal-stat-card is-<?php echo esc_attr( $stat_tone ); ?>">
	<span class="ugcify-portal-stat-card__label"><?php echo esc_html( $stat_label ); ?></span>
	<strong class="ugcify-portal-stat-card__value" data-ugcify-portal-stat="<?php echo esc_attr( $stat_key ); ?>"><?php echo esc_html( $stat_value ); ?></strong>
	<?php if ( '' !== $stat_help ) : ?>
		<span class="ugcify-portal-stat-card__help"><?php echo esc_html( $stat_help ); ?></span>
	<?php endif; ?>
</article>