<main class="main main--article"
data-base-path='<%= custom_path_if_needed help_answer_path(@category, @object, locale: '{locale}'), @knowledge_base %>'
data-available-locales='<%= @object_locales.map(&:locale).join(',') %>'>
  <article class="article">
    <div class="container">
      <h1>
        <%= @object.translation.title %>
      </h1>

      <div class="article-content">
        <%= prepare_rich_text_links @object.translation.content.body_with_urls.html_safe %>
      </div>

      <% if (attachments = @object.attachments_sorted) && attachments.present? %>
        <div class="attachments">
          <%= icon 'paperclip' %>
          <div class="attachments-title"><%= zt('Attached Files') %></div>
          <% attachments.each do |attachment| %>
            <%= link_to custom_path_if_needed(attachment_path(attachment), @knowledge_base), class: 'attachment', download: true do %>
              <span class="attachment-name u-highlight"><%= attachment.filename %></span>
              <div class="attachment-size">404kb</div>
            <% end %>
          <% end %>
        </div>
      <% end %>
    </div>
  </article>
</main>
