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

<Providers::ActorsRelationships as |actors|>
  <div
    class="related-evaluation
      {{if (eq @eval.id @activeEvaluationID) "is-active"}}"
    data-eval={{@eval.id}}
    ...attributes
    {{did-insert (fn actors.fns.registerActor @eval)}}
    {{will-destroy (fn actors.fns.deregisterActor @eval)}}
  >
    {{#if (eq @eval.id @activeEvaluationID)}}
      <span data-test-rel-eval={{@eval.id}}>
        {{@eval.shortId}}
      </span>
    {{else}}
      <a data-test-rel-eval={{@eval.id}} {{on "click" @onClick}}>
        {{@eval.shortId}}
      </a>
    {{/if}}
    <span>
      <StatusCell @status={{@eval.status}} />
    </span>
  </div>
</Providers::ActorsRelationships>