{{page-title "Job " this.job.name " definition"}}
<JobSubnav @job={{this.job}} />
<section class="section">
  {{#if this.isEditing}}
    <JobEditor
      @job={{this.job}}
      @cancelable={{true}}
      @context="edit"
      @onCancel={{action this.onCancel}}
      @onSubmit={{action this.onSubmit}}
    />
  {{else}}
    <div class="boxed-section">
      <div class="boxed-section-head">
        Job Definition
        <button
          class="button is-light is-compact pull-right"
          type="button"
          onclick={{action this.edit}}
          data-test-edit-job
        >Edit</button>
      </div>
      <div class="boxed-section-body is-full-bleed">
        <JsonViewer data-test-definition-view @json={{this.definition}} />
      </div>
    </div>
  {{/if}}
</section>
