<PageHeader as |p|>
  <p.levelLeft>
    <h1 class="title is-3">
      Seal this vault
    </h1>
  </p.levelLeft>
</PageHeader>

{{#if model.seal.canUpdate}}
  <div class="box is-sideless is-fullwidth is-marginless">
    <p>
    Sealing a vault tells the Vault server to stop responding to any
    access operations until it is unsealed again. A sealed vault throws away
    its master key to unlock the data, so it physically is blocked from
    responding to operations again until the Vault is unsealed again with
    the "unseal" command or via the API.
    </p>
  </div>
  <div class="field is-grouped box is-fullwidth is-bottomless">
    {{#confirm-action
      onConfirmAction=(action "seal")
      confirmMessage=(concat "Are you sure you want to seal " model.cluster.name "?")
      confirmButtonText="Seal"
      buttonClasses="button is-primary"
      cancelButtonText="Cancel"
      data-test-seal=true
      }}
      Seal
    {{/confirm-action}}
  </div>
{{else}}
  <div class="box is-bottomless has-background-white-bis">
    <div class="columns is-centered">
      <div class="column is-half has-text-centered">
        <div class="box is-shadowless has-background-white-bis">
          <p class="has-text-grey">The token you are currently authenticated with does not have sufficient capabilities to seal this vault.</p>
        </div>
      </div>
    </div>
  </div>
{{/if}}
