text: var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  var __metadata = (this && this.__metadata) || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
  };
  /**
   * @license
   * Copyright Akveo. All Rights Reserved.
   * Licensed under the MIT License. See License.txt in the project root for license information.
   */
  import { Component } from '@angular/core';
  import { Location } from '@angular/common';
  import { NbAuthService } from '../services/auth.service';
  import { takeWhile } from 'rxjs/operators';
  let NbAuthComponent = class NbAuthComponent {
      // showcase of how to use the onAuthenticationChange method
      constructor(auth, location) {
          this.auth = auth;
          this.location = location;
          this.alive = true;
          this.authenticated = false;
          this.token = '';
          this.subscription = auth.onAuthenticationChange()
              .pipe(takeWhile(() => this.alive))
              .subscribe((authenticated) => {
              this.authenticated = authenticated;
          });
      }
      back() {
          this.location.back();
          return false;
      }
      ngOnDestroy() {
          this.alive = false;
      }
  };
  NbAuthComponent = __decorate([
      Component({
          selector: 'nb-auth',
          template: `
      <nb-layout>
        <nb-layout-column>
          <nb-card>
            <nb-card-header>
              <nav class="navigation">
                <a href="#" (click)="back()" class="link back-link" aria-label="Back">
                  <nb-icon icon="arrow-back"></nb-icon>
                </a>
              </nav>
            </nb-card-header>
            <nb-card-body>
              <nb-auth-block>
                <router-outlet></router-outlet>
              </nb-auth-block>
            </nb-card-body>
          </nb-card>
        </nb-layout-column>
      </nb-layout>
    `,
          styles: ["/*!\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */:host nb-card{margin:0;height:calc(100vh - 2 * 2.5rem)}:host .navigation .link{display:inline-block;text-decoration:none}:host .navigation .link nb-icon{font-size:2rem;vertical-align:middle}:host .links nb-icon{font-size:2.5rem}:host nb-card-body{display:flex;width:100%}:host nb-auth-block{margin:auto}@media (max-width: 767.98px){:host nb-card{border-radius:0;height:100vh}}:host ::ng-deep nb-layout .layout .layout-container .content .columns nb-layout-column{padding:2.5rem}@media (max-width: 767.98px){:host ::ng-deep nb-layout .layout .layout-container .content .columns nb-layout-column{padding:0}}\n"]
      }),
      __metadata("design:paramtypes", [NbAuthService, Location])
  ], NbAuthComponent);
  export { NbAuthComponent };
  //# sourceMappingURL=auth.component.js.map