{% import "@SyliusAdmin/Common/Macro/money.html.twig" as money %}
<div id="pricing">
    <h4 class="ui top attached large header">{{ 'sylius.ui.pricing'|trans }}</h4>
    <div class="ui attached segment">
        <table id="pricing" class="ui very basic celled table">
            <thead>
                <tr>
                    <th><strong class="gray text">{{ 'sylius.ui.channels'|trans }}</strong></th>
                    <th><strong class="gray text">{{ 'sylius.ui.price'|trans }}</strong></th>
                    <th><strong class="gray text">{{ 'sylius.ui.original_price'|trans }}</strong></th>
                </tr>
            </thead>
            <tbody>
            {% for channelPricing in product.variants.first.channelPricings %}
                {% if product.channels.first != false %}
                    <tr>
                        <td class="five wide gray text">
                            <strong>{{ channelPricing.channelCode|sylius_channel_name }} </strong>
                        </td>
                        <td>{{ money.format(channelPricing.price, product.channels.first.baseCurrency) }}</td>
                        {% if channelPricing.originalPrice != null %}
                            <td>{{ money.format(channelPricing.originalPrice, product.channels.first.baseCurrency) }}</td>
                        {% else %}
                            <td>-</td>
                        {% endif %}
                    </tr>
                {% endif %}
            {% endfor %}
            </tbody>
        </table>
    </div>
</div>
