import { CommonModule } from "@angular/common";
import { Component } from "@angular/core";
import { RouterModule } from "@angular/router";

import { ButtonModule } from "@bitwarden/components";

import { JslibModule } from "../../jslib.module";

/**
 * This component is used to display a message to the user that their authentication session has expired.
 * It provides a button to navigate to the login page.
 */
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
  selector: "app-authentication-timeout",
  imports: [CommonModule, JslibModule, ButtonModule, RouterModule],
  template: `
    <p class="tw-text-center">
      {{ "authenticationSessionTimedOut" | i18n }}
    </p>
    <a routerLink="/login" bitButton block buttonType="primary">
      {{ "logIn" | i18n }}
    </a>
  `,
})
export class AuthenticationTimeoutComponent {}
