text: /*
   * Copyright (c) 2016 VMware, Inc. All Rights Reserved.
   * This software is released under MIT license.
   * The full license information can be found in LICENSE in the root directory of this project.
   */
  import { Input, Directive, ElementRef, Renderer2 } from "@angular/core";
  var CodeHighlight = (function () {
      //Had to use renderer because I wanted to add to existing classes on the code block
      //Didn't want to override them completely
      function CodeHighlight(_el, renderer) {
          this._el = _el;
          this.renderer = renderer;
          this._highlight = "";
      }
      CodeHighlight.prototype.ngAfterContentInit = function () {
          this.redraw();
      };
      CodeHighlight.prototype.redraw = function () {
          if (this._el && this._el.nativeElement) {
              Prism.highlightElement(this._el.nativeElement);
          }
      };
      Object.defineProperty(CodeHighlight.prototype, "highlight", {
          get: function () {
              return this._highlight;
          },
          set: function (val) {
              if (val && val.trim() !== "") {
                  this._highlight = val;
                  this.renderer.addClass(this._el.nativeElement, this._highlight);
              }
          },
          enumerable: true,
          configurable: true
      });
      return CodeHighlight;
  }());
  export { CodeHighlight };
  CodeHighlight.decorators = [
      { type: Directive, args: [{
                  selector: "code[clr-code-highlight]"
              },] },
  ];
  /** @nocollapse */
  CodeHighlight.ctorParameters = function () { return [
      { type: ElementRef, },
      { type: Renderer2, },
  ]; };
  CodeHighlight.propDecorators = {
      'highlight': [{ type: Input, args: ["clr-code-highlight",] },],
  };
  //# sourceMappingURL=syntax-highlight.js.map