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

<Hds::SideNav::Portal @ariaLabel="Tools Navigation Links" data-test-sidebar-nav-panel="Tools" as |Nav|>
  <Nav.BackLink
    @route="vault.cluster"
    @current-when={{false}}
    @icon="arrow-left"
    @text="Back to main navigation"
    data-test-sidebar-nav-link="Back to main navigation"
  />

  <Nav.Title data-test-sidebar-nav-heading="Tools">Tools</Nav.Title>

  {{#each (tools-actions) as |supportedAction|}}
    {{#if (has-permission "tools" routeParams=supportedAction)}}
      <Nav.Link
        @route="vault.cluster.tools.tool"
        @model={{supportedAction}}
        @text={{capitalize supportedAction}}
        data-test-sidebar-nav-link={{capitalize supportedAction}}
      />
    {{/if}}
  {{/each}}
  <Nav.Link @route="vault.cluster.tools.open-api-explorer" @text="API Explorer" data-test-sidebar-nav-link="API Explorer" />
</Hds::SideNav::Portal>