@if (!restarted) {
  <h1 class="title">StartOS - {{ 'Diagnostic Mode' | i18n }}</h1>
  @if (error) {
    <h2 class="subtitle">StartOS {{ 'launch error' | i18n }}:</h2>
    <code class="code warning">
      <p>{{ error.problem }}</p>
      @if (error.details) {
        <p>{{ error.details }}</p>
      }
    </code>
    <a tuiButton routerLink="logs">{{ 'View logs' | i18n }}</a>
    <h2 class="subtitle">{{ 'Possible solutions' | i18n }}:</h2>
    <code class="code">
      <p>{{ error.solution }}</p>
    </code>
    <div class="buttons">
      <button tuiButton (click)="restart()">
        {{ 'Restart server' | i18n }}
      </button>
      @if (error.code === 15 || error.code === 25) {
        <button tuiButton appearance="secondary" (click)="forgetDrive()">
          {{
            error.code === 15
              ? ('Setup current drive' | i18n)
              : ('Enter recovery mode' | i18n)
          }}
        </button>
      }
      <button
        tuiButton
        appearance="secondary-destructive"
        (click)="presentAlertRepairDisk()"
      >
        {{ 'Repair drive' | i18n }}
      </button>
    </div>
  }
} @else {
  <h1 class="title">{{ 'Server is restarting' | i18n }}</h1>
  <h2 class="subtitle">
    {{ 'Wait for the server to restart, then refresh this page.' | i18n }}
  </h2>
  <button tuiButton (click)="refreshPage()">{{ 'Refresh' | i18n }}</button>
}
