<% if easy_page_modules_data[:number_to_show] %>
  <div class="easy-trend">
    <% if settings['easy_icon'] != '' %>
      <i class="<%= "#{settings['easy_icon']}" %> easy-trend__icon"></i>
    <% end %>
    <div class="easy-trend__wrapper">
      <div class="easy-trend__data">
        <span title="<%= easy_page_modules_data[:formula_tooltip] %>">
          <%= format_locale_number(easy_page_modules_data[:number_to_show], strip_insignificant_zeros: true) %>
        </span>
        <% if settings['use_query_to_compare'] == 'true' && settings['operator'] %>
          <% if easy_page_modules_data[:trend_icon] %>
            <i class="<%= easy_page_modules_data[:trend_icon] %> easy-trend__direction" title="<%= "#{l(:label_trends_compare_value)}: #{easy_page_modules_data[:number_to_compare]}" %>"></i>
            <span class="easy-trend__percent">
             <%= "(#{format_locale_number(easy_page_modules_data[:trend_percent], percentage: true) if easy_page_modules_data[:trend_percent]})" %>
            </span>
          <% end %>
        <% end %>
      </div>
      <div class="easy-trend__description">
        <p><%= settings['description'] %></p>
      </div>
    </div>
  </div>
<% else %>
  <div class="info"><%= l(:label_easy_page_module_settings_missing) %></div>
<% end %>
