<%
const info = _.cms('info')
const barCols = []
;[
  ['shipping', 'shipping-fast'],
  ['installments', 'credit-card'],
  ['exchange', 'exchange'],
  ['promo', 'percent']
].forEach(([prop, icon]) => {
  if (info[prop] && info[prop].show) {
    const { link, title, text } = info[prop]
    barCols.push({ link, title, text, icon })
  }
})
%>

<% if (barCols.length) { %>
  <section class="info-bar">
    <div class="container">
      <div class="info-bar__nav row">
        <% barCols.forEach(({ link, icon, title, text }) => { %>
          <div class="col-auto col-sm-6 col-lg">
            <a class="info-bar__item" href="<%= link || 'javascript:;' %>">
              <span class="rounded-icon">
                <i class="i-<%= icon %>"></i>
              </span>
              <div class="ml-2 ml-md-3">
                <% if(title) { %>
                  <div class="info-bar__title">
                    <%= title %>
                  </div>
                <% } %>
                <div class="info-bar__text">
                  <%= text %>
                </div>
              </div>
            </a>
          </div>
        <% }) %>
      </div>
    </div>
  </section>
<% } %>
