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

{{#each (if @model.alias.id (array @model.alias) @model.aliases) as |item|}}
  <LinkedBlock @params={{array "vault.cluster.access.identity.aliases.show" item.id "details"}} class="list-item-row">
    <div class="columns is-mobile">
      <div class="column is-10">
        <LinkTo
          @route="vault.cluster.access.identity.aliases.show"
          @models={{array item.id "details"}}
          class="has-text-black has-text-weight-semibold"
        >
          <Icon @name="user" class="has-text-grey-light" />
          <span class="has-text-weight-semibold">{{item.name}}</span>
        </LinkTo>
        <div class="has-text-grey">
          {{item.id}}
        </div>
        <span class="tag">{{item.mountType}}</span>
        <span class="has-text-grey is-size-8">
          {{item.mountAccessor}}
        </span>
      </div>
      <div class="column has-text-right">
        <Identity::PopupAlias @params={{array item}} />
      </div>
    </div>
  </LinkedBlock>
{{else}}
  <EmptyState @title="No {{@model.identityType}} aliases for {{@model.name}} yet" />
{{/each}}