<div class="card mb-3">
  <div class="card-header">
    <h5 class="card-title small mb-0">
      <i class="bi bi-list-ul me-2"></i>Job Arguments
    </h5>
  </div>
  <div class="card-body p-0">
    <div class="list-group list-group-flush overflow-x-auto good-job-arg-grid">
      <% arguments_for_job(job).each do |job_arg| %>
        <div class='good-job-arg-row'>
          <% if job_arg.inferred %>
            <div class="fw-medium text-muted small good-job-arg-name fst-italic"><%= job_arg.key %></div>
          <% else %>
            <div class="fw-bold text-muted small good-job-arg-name"><%= job_arg.key %></div>
          <% end %>
          <div class="good-job-arg-value">
            <% case job_arg.value %>
            <% when HttpLogEntry %>
              <%= render "good_job/arguments/http_log_entry", log_entry: job_arg.value %>
            <% when Domain::PostFile %>
              <%= render "good_job/arguments/domain_post_file", post_file: job_arg.value %>
            <% when Domain::Post %>
              <%= render "good_job/arguments/domain_post", post: job_arg.value %>
            <% when Domain::User %>
              <%= render "good_job/arguments/domain_user", user: job_arg.value %>
            <% when Domain::UserAvatar %>
              <%= render "good_job/arguments/domain_user_avatar", user_avatar: job_arg.value %>
            <% when GoodJob::Job %>
              <%= render "good_job/arguments/good_job_job", job: job_arg.value %>
            <% else %>
              <div class="text-truncate">
                <% if job_arg.inferred %>
                  <span class="small fst-italic" title="<%= job_arg.value.to_s %>"><%= job_arg.value.to_s %></span>
                <% else %>
                  <code class="small" title="<%= job_arg.value.inspect %>"><%= job_arg.value.inspect %></code>
                <% end%>
              </div>
            <% end %>
          </div>
        </div>
      <% end %>
    </div>
  </div>
</div>
