<% checklist ||= report_element.checklist %>
<% items = checklist.checklist_items %>
<% timestamp = checklist.created_at %>
<% export_all = defined?(export_all) && export_all %>
<div class="report-element report-step-attachment-element report-step-checklist-element">
  <div class="report-element-header">
    <div class="row">
      <div class="pull-left attachment-icon">
        <span class="fas fa-tasks"></span>
      </div>
      <div class="pull-left checklist-name">
        <%= custom_auto_link(t('projects.reports.elements.step_checklist.checklist_name',
                               name: checklist.name),
                               team: current_team,
                               base64_encoded_imgs: export_all) %>
      </div>
      <div class="pull-left user-time">
        <%= t('projects.reports.elements.step_checklist.user_time', timestamp: l(timestamp, format: :full)) %>
      </div>
    </div>
  </div>
  <div class="report-element-body">
    <ul class="no-style">
      <% items.each do |item| %>
        <li>
          <input type="checkbox" disabled="disabled" <%= "checked='checked'" if item.checked %>/>
          <span class="<%= 'checked' if item.checked %>">
            <%= custom_auto_link(item.text,
                                 team: current_team,
                                 simple_format: true,
                                 wrapper_tag: { wrapper_tag: 'span'},
                                 base64_encoded_imgs: export_all) %>
          </span>
        </li>
      <% end %>
    </ul>
  </div>
  <% if defined?(children) %>
    <div class="report-element-children">
      <%= children %>
    </div>
  <% end %>
</div>
