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

<div class="legend-item">
  <span
    class="color-swatch {{if @datum.className @datum.className (concat "swatch-" @index)}}"
  ></span>
  <span class="text">
    <span class="value" data-test-legend-value="{{@datum.className}}">
      {{@datum.value}}
    </span>
    <span>
      {{@datum.label}}
    </span>
  </span>
  {{#if @datum.help}}
    <span class="tooltip multiline" role="tooltip" aria-label="{{@datum.help}}">
      <Hds::Icon @name="info" @color="faint" />
    </span>
  {{/if}}
</div>
