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;
  };
  import { NgModule, Directive, } from '@angular/core';
  import { MdCommonModule } from '../common-behaviors/common-module';
  /**
   * Shared directive to count lines inside a text area, such as a list item.
   * Line elements can be extracted with a @ContentChildren(MdLine) query, then
   * counted by checking the query list's length.
   */
  var MdLine = (function () {
      function MdLine() {
      }
      return MdLine;
  }());
  MdLine = __decorate([
      Directive({
          selector: '[md-line], [mat-line], [mdLine], [matLine]',
          host: { 'class': 'mat-line' }
      })
  ], MdLine);
  export { MdLine };
  /**
   * Helper that takes a query list of lines and sets the correct class on the host.
   * @docs-private
   */
  var MdLineSetter = (function () {
      function MdLineSetter(_lines, _renderer, _element) {
          var _this = this;
          this._lines = _lines;
          this._renderer = _renderer;
          this._element = _element;
          this._setLineClass(this._lines.length);
          this._lines.changes.subscribe(function () {
              _this._setLineClass(_this._lines.length);
          });
      }
      MdLineSetter.prototype._setLineClass = function (count) {
          this._resetClasses();
          if (count === 2 || count === 3) {
              this._setClass("mat-" + count + "-line", true);
          }
          else if (count > 3) {
              this._setClass("mat-multi-line", true);
          }
      };
      MdLineSetter.prototype._resetClasses = function () {
          this._setClass('mat-2-line', false);
          this._setClass('mat-3-line', false);
          this._setClass('mat-multi-line', false);
      };
      MdLineSetter.prototype._setClass = function (className, isAdd) {
          if (isAdd) {
              this._renderer.addClass(this._element.nativeElement, className);
          }
          else {
              this._renderer.removeClass(this._element.nativeElement, className);
          }
      };
      return MdLineSetter;
  }());
  export { MdLineSetter };
  var MdLineModule = (function () {
      function MdLineModule() {
      }
      return MdLineModule;
  }());
  MdLineModule = __decorate([
      NgModule({
          imports: [MdCommonModule],
          exports: [MdLine, MdCommonModule],
          declarations: [MdLine],
      })
  ], MdLineModule);
  export { MdLineModule };
  //# sourceMappingURL=line.js.map