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

{{#if (eq @model.httpStatus 404)}}
  <NotFound @model={{this.model}} />
{{else}}
  <EmptyState
    @title={{if (eq @model.httpStatus 403) "You are not authorized" "Error"}}
    @subTitle="Error {{@model.httpStatus}}"
    @icon="skip"
  >
    {{#if (eq @model.httpStatus 403)}}
      <p>
        You must be granted permissions to view this page. Ask your administrator if you think you should have access to the
        <code>{{@model.path}}</code>
        endpoint.
      </p>
    {{else}}
      <ul>
        {{#if @model.message}}
          <li>{{@model.message}}</li>
          <hr />
        {{/if}}
        {{#each @model.errors as |error|}}
          <li>
            {{error}}
          </li>
        {{/each}}
      </ul>
    {{/if}}
  </EmptyState>
{{/if}}