
<?php
    // Callers pass either an array of labels or a pre-joined comma separated string.
    $points = is_array($alert_points)
        ? $alert_points
        : preg_split('/\s*,\s*/', (string) $alert_points, -1, PREG_SPLIT_NO_EMPTY);

    $points = array_values(array_filter(array_map('trim', $points), function ($point) {
        return $point !== '';
    }));
?>

<?php if(count($points) > 0): ?>
    <div style="font-weight: 600; padding-bottom: 4px;"><?php echo e($alert_title); ?> (<?php echo e(count($points)); ?>):
        <code style="font-weight: 500;"><?php echo e(implode(', ', $points)); ?></code>
    </div>
<?php endif; ?>
