<% 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="checklist-name">
      <%= custom_auto_link(checklist.name,
                           team: current_team,
                           base64_encoded_imgs: export_all) %>
    </div>
    <% unless @settings['exclude_timestamps'] %>
      <div class="user-time">
        <%= t('projects.reports.elements.step_checklist.user_time', timestamp: l(timestamp, format: :full)) %>
      </div>
    <% end %>
  </div>
  <div class="report-element-body">
    <% items.each do |item| %>
      <div class="report-checklist-item">
        <div><input type="checkbox" disabled="disabled" <%= "checked='checked'" if item.checked %>/></div>
        <div class="report-checklist-item-text"><%= custom_auto_link(item.text, # Must be on one line
                                team: current_team,
                                simple_format: false,
                                wrapper_tag: { wrapper_tag: 'span'},
                                base64_encoded_imgs: export_all) %>
        </div>
      </div>
    <% end %>
  </div>
  <% if defined?(children) %>
    <div class="report-element-children">
      <%= children %>
    </div>
  <% end %>
</div>
