{% macro icon_display(formatter, value) -%}
    {%- if value -%}
        <span class="text-green-600" data-test="bool-true">{{ tabler_icon('circle-check', 24) }}</span>
    {%- else -%}
        <span class="text-red-600" data-test="bool-false">{{ tabler_icon('circle-x', 24) }}</span>
    {% endif -%}
{% endmacro -%}

{% macro badge_display(formatter, value) -%}
    {% if value -%}
        <span class="badge badge-green" data-test="bool-true">{{ formatter.true_text }}</span>
    {% else -%}
        <span class="badge badge-red" data-test="bool-false">{{ formatter.false_text }}</span>
    {% endif -%}
{% endmacro -%}

<div class="flex justify-center">
    {% if formatter.as_text -%}
        {{ badge_display(formatter, value) }}
    {% else -%}
        {{ icon_display(formatter, value) }}
    {% endif -%}
</div>
