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

<PopupMenu @name="policy-menu">
  <nav class="menu">
    <ul class="menu-list">
      <li class="action">
        <LinkTo @route="vault.cluster.policy.show" @models={{array "acl" this.policyName}}>
          View Policy
        </LinkTo>
      </li>
      <li class="action">
        <LinkTo @route="vault.cluster.policy.edit" @models={{array "acl" this.policyName}}>
          Edit Policy
        </LinkTo>
      </li>
      <li class="action">
        <ConfirmAction
          @buttonClasses="link is-destroy"
          @confirmButtonText="Remove"
          @confirmMessage="This policy may affect permissions to access Vault data."
          @onConfirmAction={{action "performTransaction" this.model this.policyName}}
        >
          Remove from
          {{this.model.identityType}}
        </ConfirmAction>
      </li>
    </ul>
  </nav>
</PopupMenu>