<?php
/*
|--------------------------------------------------------------------------
| PACK 579 ENTERPRISE HELPERS
|--------------------------------------------------------------------------
*/

if (!function_exists('ec_render_badge')) {

    function ec_render_badge(string $text, string $class='primary'): string
    {
        return '<span class="ec-badge ec-badge-'.$class.'">'
            . htmlspecialchars($text) .
            '</span>';
    }
}

if (!function_exists('ec_safe')) {

    function ec_safe(?string $value): string
    {
        return htmlspecialchars((string)$value);
    }
}
?>
