{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: MPL-2.0
~}}

<JobPage @job={{@job}} as |jobPage|>
  <jobPage.ui.Body>
    <jobPage.ui.Error />
    <jobPage.ui.Title @title={{@job.trimmedName}}>
      <span class="tag is-hollow">
        periodic
      </span>
      <button
        data-test-force-launch
        class="button is-warning is-small is-inline"
        onclick={{fn this.forceLaunch jobPage.fns.setError}}
        type="button"
      >
        Force Launch
      </button>
    </jobPage.ui.Title>
    <jobPage.ui.StatsBox>
      <:after-namespace>
        <span class="pair" data-test-job-stat="cron">
          <span class="term">
            {{pluralize "Cron" (or @job.periodicDetails.Specs.length 1)}}
          </span>
            {{#each @job.periodicDetails.Specs as |spec|}}
            <span class="bumper-right tag">{{spec}}</span>
            {{else}}
            <span class="tag">{{@job.periodicDetails.Spec}}</span>
            {{/each}}
        </span>
      </:after-namespace>
    </jobPage.ui.StatsBox>
    <jobPage.ui.Summary />
    <jobPage.ui.Children
      @sortProperty={{@sortProperty}}
      @sortDescending={{@sortDescending}}
      @currentPage={{@currentPage}}
    />
    <jobPage.ui.Meta />
  </jobPage.ui.Body>
</JobPage>