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

{{#if this.componentName}}
  {{component this.componentName item=this.item}}
{{else if this.linkParams}}
  <LinkedBlock
    @params={{this.linkParams}}
    @queryParams={{@queryParams}}
    @linkPrefix={{@linkPrefix}}
    class="list-item-row"
    data-test-list-item-link
  >
    <div class="level is-mobile">
      <div class="level-left is-flex-grow-1" data-test-list-item-content>
        <LinkTo
          @route={{this.link.route}}
          @models={{this.link.models}}
          class="has-text-weight-semibold has-text-black is-display-flex is-flex-grow-1 is-no-underline"
        >
          {{yield (hash content=(component "list-item/content"))}}
        </LinkTo>
      </div>
      <div class="level-right">
        <div class="level-item" data-test-list-item-popup>
          {{yield
            (hash callMethod=this.callMethod menu=(component "list-item/popup-menu" item=this.item hasMenu=this.hasMenu))
          }}
        </div>
      </div>
    </div>
  </LinkedBlock>
{{else}}
  <div class="list-item-row">
    <div class="level is-mobile">
      <div class="level-left is-flex-grow-1 has-text-weight-semibold" data-test-list-item>
        {{yield (hash content=(component "list-item/content"))}}
      </div>
      <div class="level-right">
        <div class="level-item" data-test-list-item-popup>
          {{yield
            (hash callMethod=this.callMethod menu=(component "list-item/popup-menu" item=this.item hasMenu=this.hasMenu))
          }}
        </div>
      </div>
    </div>
  </div>
{{/if}}