{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}

{{#if this.unwrapTokenError}}
  <Hds::ApplicationState class="has-top-margin-xxl" data-test-page-error as |A|>
    <A.Header @title="Authentication error" />
    <A.Body @text="Token unwrap failed" />
    <A.Body @text="Error: {{this.unwrapTokenError}}" />
    <A.Footer as |F|>
      <F.Button @icon="arrow-left" @color="tertiary" @text="Go back" {{on "click" (action "backToLogin")}} />
    </A.Footer>
  </Hds::ApplicationState>
{{else}}
  <Auth::Page
    @cluster={{this.model.clusterModel}}
    @directLinkData={{this.model.directLinkData}}
    @loginAndTransition={{this.loginAndTransition}}
    @loginSettings={{this.model.loginSettings}}
    @namespaceQueryParam={{this.namespaceQueryParam}}
    @oidcProviderQueryParam={{this.oidcProvider}}
    @onNamespaceUpdate={{perform this.updateNamespace}}
    @roleQueryParam={{this.role}}
    @shouldRefocusNamespaceInput={{this.shouldRefocusNamespaceInput}}
    @visibleAuthMounts={{this.model.visibleAuthMounts}}
  />
{{/if}}