{%
    set viewOptions = {
        authorized: { icon: "check", color: "success" } ,
        awaiting_payment: { icon: "clock", color: "warning" } ,
        cancelled: { icon: "ban", color: "danger" } ,
        paid: { icon: "check", color: "success" } ,
        partially_authorized: { icon: "check", color: "warning" } ,
        partially_paid: { icon: "adjust", color: "warning" } ,
        partially_refunded: { icon: "reply", color: "warning" } ,
        refunded: { icon: "reply all", color: "success" } ,
    }
%}

{% set value = 'sylius.ui.' ~ state %}

<div class="badge badge-{{ viewOptions[state]['color'] }}">
    <i class="{{ viewOptions[state]['icon'] }} icon"></i>
    <span id="order-payment-status" {{ sylius_test_html_attribute('order-payment-state') }}>{{ value|trans }}</span>
</div>
