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

<HeaderCredentials @role={{this.role}} @scope={{this.scope}} />
<Toolbar>
  <ToolbarActions>
    {{#if this.model.updatePath.canUpdate}}
      <ConfirmAction
        @buttonClasses="toolbar-link"
        @onConfirmAction={{this.deleteRole}}
        @confirmMessage={{concat "Are you sure you want to delete " this.model.id "?"}}
        @cancelButtonText="Cancel"
      >
        Delete role
      </ConfirmAction>
      <div class="toolbar-separator"></div>
    {{/if}}
    {{#if this.model.updatePath.canUpdate}}
      <ToolbarLink @route="role.edit" @models={{array this.scope this.role}} data-test-kmip-link-edit-role>
        Edit role
      </ToolbarLink>
    {{/if}}
  </ToolbarActions>
</Toolbar>
<div class="box is-fullwidth is-sideless is-shadowless">
  <FieldGroupShow @model={{this.model}} @showAllFields={{false}} />
  <div class="box is-fullwidth is-shadowless">
    <h2 class="title is-5">
      Allowed operations
    </h2>
    <OperationFieldDisplay @model={{this.model}} />
  </div>
</div>