text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var layout_1 = require("@angular/cdk/layout");
  var core_1 = require("@angular/core");
  /** @title Responsive sidenav */
  var SidenavResponsiveExample = /** @class */ (function () {
      function SidenavResponsiveExample(changeDetectorRef, media) {
          this.fillerNav = Array.from({ length: 50 }, function (_, i) { return "Nav Item " + (i + 1); });
          this.fillerContent = Array.from({ length: 50 }, function () {
              return "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n       labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n       laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n       voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat\n       cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
          });
          this.shouldRun = [/(^|\.)plnkr\.co$/, /(^|\.)stackblitz\.io$/].some(function (h) { return h.test(window.location.host); });
          this.mobileQuery = media.matchMedia('(max-width: 600px)');
          this._mobileQueryListener = function () { return changeDetectorRef.detectChanges(); };
          this.mobileQuery.addListener(this._mobileQueryListener);
      }
      SidenavResponsiveExample.prototype.ngOnDestroy = function () {
          this.mobileQuery.removeListener(this._mobileQueryListener);
      };
      SidenavResponsiveExample.decorators = [
          { type: core_1.Component, args: [{
                      selector: 'sidenav-responsive-example',
                      template: "<div class=\"example-container\" [class.example-is-mobile]=\"mobileQuery.matches\" *ngIf=\"shouldRun\"><mat-toolbar color=\"primary\" class=\"example-toolbar\"><button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button><h1 class=\"example-app-name\">Responsive App</h1></mat-toolbar><mat-sidenav-container class=\"example-sidenav-container\" [style.marginTop.px]=\"mobileQuery.matches ? 56 : 0\"><mat-sidenav #snav [mode]=\"mobileQuery.matches ? 'over' : 'side'\" [fixedInViewport]=\"mobileQuery.matches\" fixedTopGap=\"56\"><mat-nav-list><a mat-list-item routerLink=\".\" *ngFor=\"let nav of fillerNav\">{{nav}}</a></mat-nav-list></mat-sidenav><mat-sidenav-content><p *ngFor=\"let content of fillerContent\">{{content}}</p></mat-sidenav-content></mat-sidenav-container></div><div *ngIf=\"!shouldRun\">Please open on Stackblitz to see result</div>",
                      styles: [".example-container { display: flex; flex-direction: column; position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .example-is-mobile .example-toolbar { position: fixed; /* Make sure the toolbar will stay on top of the content as it scrolls past. */ z-index: 2; } h1.example-app-name { margin-left: 8px; } .example-sidenav-container { /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */ flex: 1; } .example-is-mobile .example-sidenav-container { /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the `<body>` to be our scrolling element for mobile layouts. */ flex: 1 0 auto; } "],
                  },] },
      ];
      /** @nocollapse */
      SidenavResponsiveExample.ctorParameters = function () { return [
          { type: core_1.ChangeDetectorRef, },
          { type: layout_1.MediaMatcher, },
      ]; };
      return SidenavResponsiveExample;
  }());
  exports.SidenavResponsiveExample = SidenavResponsiveExample;
  //# sourceMappingURL=sidenav-responsive-example.js.map