{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}
<Page::Header>
  <:breadcrumbs>
    <Page::Breadcrumbs
      @breadcrumbs={{array
        (hash
          label=(if this.model.backend this.model.backend "Secrets")
          route=(if this.model.backend "vault.cluster.secrets.backend.list-root" "vault.cluster.secrets")
        )
      }}
    />
  </:breadcrumbs>
</Page::Header>

<Page::Error @error={{this.model}} @isFullPage={{true}}>
  <:customFooter as |AppState|>
    {{#if (eq this.model.httpStatus 404)}}
      <AppState.Body @text="Try going back to the root and navigating from there." />
      <AppState.Footer as |F|>
        <F.LinkStandalone
          @icon="arrow-left"
          @text="Go back"
          @route={{if this.model.backend "vault.cluster.secrets.backend.list-root" "vault.cluster.secrets"}}
        />
      </AppState.Footer>
    {{else if (eq this.model.httpStatus 403)}}
      {{#if this.model.secret}}
        <AppState.Footer as |F|>
          <F.LinkStandalone
            @icon="arrow-left"
            @text="Navigate back to the root"
            @route="vault.cluster.secrets.backend.list-root"
          />
        </AppState.Footer>
      {{else}}
        <AppState.Footer as |F|>
          <F.LinkStandalone @icon="arrow-right" @iconPosition="trailing" @text="Go to dashboard" @route="vault" />
        </AppState.Footer>
      {{/if}}
    {{/if}}
  </:customFooter>
</Page::Error>