<PageHeader as |p|>
  <p.top>
    <nav class="breadcrumb">
      <ul>
        <li>
          <span class="sep">&#x0002f;</span>
          <LinkTo @route="vault.cluster.access.identity.index">
            {{capitalize (pluralize this.model.identityType)}}
          </LinkTo>
        </li>
      </ul>
    </nav>
  </p.top>
  <p.levelLeft>
    <h1 class="title is-3">
      {{this.model.name}}
    </h1>
  </p.levelLeft>
</PageHeader>
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
  <nav class="tabs sub-nav">
    <ul>
      {{#each (tabs-for-identity-show this.model.identityType this.model.type) as |tab|}}
        <LinkTo
          @route="vault.cluster.access.identity.show"
          @models={{array (pluralize this.model.identityType) this.model.id tab}}
          data-test-tab-subnav={{tab}}
        >
          {{capitalize (humanize tab)}}
        </LinkTo>
      {{/each}}
    </ul>
  </nav>
</div>
<Toolbar>
  <ToolbarActions>
    {{! template-lint-configure simple-unless "warn" }}
    {{#unless (or (and (eq this.model.identityType "group") (eq this.model.type "internal")) this.model.alias)}}
      <ToolbarLink
        @type="add"
        @params={{array "vault.cluster.access.identity.aliases.add" (pluralize this.model.identityType) this.model.id}}
        data-test-entity-create-link={{true}}
      >
        Add alias
      </ToolbarLink>
    {{/unless}}
    <ToolbarLink
      @params={{array "vault.cluster.access.identity.edit" (pluralize this.model.identityType) this.model.id}}
      data-test-entity-edit-link={{true}}
    >
      Edit
      {{this.model.identityType}}
    </ToolbarLink>
  </ToolbarActions>
</Toolbar>
{{component (concat "identity/item-" this.section) model=this.model}}