<Identity::EntityNav @identityType={{this.identityType}} @model={{this.model}} />
{{#if this.model.meta.total}}
  {{#each this.model as |item|}}
    <LinkedBlock
      @params={{array "vault.cluster.access.identity.aliases.show" item.id "details"}}
      class="list-item-row"
      data-test-identity-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="is-block has-text-black has-text-weight-semibold"
            data-test-identity-link={{item.id}}
          >
            <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}} @onSuccess={{action "onDelete"}} />
        </div>
      </div>
    </LinkedBlock>
  {{/each}}
  {{#if (gt this.model.meta.lastPage 1)}}
    <ListPagination
      @page={{this.model.meta.currentPage}}
      @lastPage={{this.model.meta.lastPage}}
      @link="vault.cluster.access.identity.aliases.index"
    />
  {{/if}}
{{else}}
  <EmptyState
    @title="No {{this.identityType}} aliases yet"
    @message="A list of {{this.identityType}} aliases in this namespace will be listed here. Choose one of the {{pluralize
      this.identityType
    }} and click &quot;Create Alias&quot; to get started."
  >
    <LinkTo @route="vault.cluster.access.identity.create" @model={{pluralize this.identityType}} class="link">
      Create
      {{this.identityType}}
    </LinkTo>
    <DocLink @path="/vault/tutorials/auth-methods/identity">
      Learn more
    </DocLink>
  </EmptyState>
{{/if}}