<!-- component definition -->
{define badge, bool $show = true, string $title = '', $class = null}
<span class="badge ms-2 font-size-small {$class ?? 'bg-body-secondary text-body'}" n:if="$show" title="{$title}">
{block content}{/block}
</span>
{/define}
<!-- usage -->
{embed badge, $client !== null, 'Uhrazeno'}
{block content}
<i class="mdi mdi-check text-success"></i>
{$client->totalInvoicePricePaid|price:0}
{/block}
{/embed}