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

{{#if (eq this.model.httpStatus 404)}}
  <NotFound @model={{this.model}} />
{{else}}
  <PageHeader as |p|>
    <p.levelLeft>
      <h1 class="title is-3 has-text-grey">
        {{#if (eq this.model.httpStatus 403)}}
          Not authorized
        {{else}}
          Error
        {{/if}}
      </h1>
    </p.levelLeft>
  </PageHeader>
  <div class="box is-sideless has-background-white-bis has-text-grey has-text-centered">
    {{#if (and (eq this.model.httpStatus 403) (eq this.model.policyPath "sys/capabilities-self"))}}
      <p>
        Your auth token does not have access to
        <code>{{this.model.policyPath}}</code>. Vault Enterprise uses this endpoint to determine what actions are allowed in
        the interface.
      </p>
      <p>
        Make sure the policy for the path
        <code>{{this.model.policyPath}}</code>
        includes
        <code>capabilities = ['update']</code>.
      </p>
    {{else}}
      {{#if this.model.message}}
        <p>{{this.model.message}}</p>
      {{/if}}
      {{#each this.model.errors as |error|}}
        <p>
          {{error}}
        </p>
      {{/each}}
    {{/if}}
  </div>
{{/if}}