<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>">
  <% if variants %>
    <legend align="center"><%= t(".master_variant") %> <%= admin_hint t(".master_variant"), I18n.t(:master_variant, scope: [:spree, :hints, "spree/price"]) %></legend>
  <% end %>

  <%= paginate master_prices, theme: "solidus_admin" %>
  <table class="index master_prices">
    <colgroup>
      <col style="width: 30%">
      <col style="width: 30%">
      <col style="width: 20%">
      <col style="width: 20%">
    </colgroup>
    <thead data-hook="master_prices_header">
      <tr>
        <th><%= Spree::Price.human_attribute_name(:country) %></th>
        <th><%= Spree::Price.human_attribute_name(:currency) %></th>
        <th><%= Spree::Price.human_attribute_name(:amount) %></th>
        <th class="actions"></th>
      </tr>
    </thead>
    <% master_prices.each do |price| %>
      <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.discarded? %>">
        <td><%= price.display_country %></td>
        <td><%= price.currency %></td>
        <td><%= price.money.to_html %></td>
        <td class="actions">
          <% if can?(:edit, price) %>
            <%= link_to_edit(price, no_text: true) unless price.discarded? %>
          <% end %>
          <% if can?(:destroy, price) %>
            &nbsp;
            <%= link_to_delete(price, no_text: true) unless price.discarded? %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </table>
  <%= paginate master_prices, theme: "solidus_admin" %>
</fieldset>
