text: /**
   * @license Angular v7.1.4
   * (c) 2010-2018 Google, Inc. https://angular.io/
   * License: MIT
   */
  
  import { AUTO_STYLE, NoopAnimationPlayer } from '@angular/animations';
  import { ɵallowPreviousPlayerStylesMerge, ɵcontainsElement, ɵinvokeQuery, ɵmatchesElement, ɵvalidateStyleProperty } from '@angular/animations/browser';
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  /**
   * \@publicApi
   */
  class MockAnimationDriver {
      /**
       * @param {?} prop
       * @return {?}
       */
      validateStyleProperty(prop) { return ɵvalidateStyleProperty(prop); }
      /**
       * @param {?} element
       * @param {?} selector
       * @return {?}
       */
      matchesElement(element, selector) {
          return ɵmatchesElement(element, selector);
      }
      /**
       * @param {?} elm1
       * @param {?} elm2
       * @return {?}
       */
      containsElement(elm1, elm2) { return ɵcontainsElement(elm1, elm2); }
      /**
       * @param {?} element
       * @param {?} selector
       * @param {?} multi
       * @return {?}
       */
      query(element, selector, multi) {
          return ɵinvokeQuery(element, selector, multi);
      }
      /**
       * @param {?} element
       * @param {?} prop
       * @param {?=} defaultValue
       * @return {?}
       */
      computeStyle(element, prop, defaultValue) {
          return defaultValue || '';
      }
      /**
       * @param {?} element
       * @param {?} keyframes
       * @param {?} duration
       * @param {?} delay
       * @param {?} easing
       * @param {?=} previousPlayers
       * @return {?}
       */
      animate(element, keyframes, duration, delay, easing, previousPlayers = []) {
          /** @type {?} */
          const player = new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers);
          MockAnimationDriver.log.push((/** @type {?} */ (player)));
          return player;
      }
  }
  MockAnimationDriver.log = [];
  /**
   * \@publicApi
   */
  class MockAnimationPlayer extends NoopAnimationPlayer {
      /**
       * @param {?} element
       * @param {?} keyframes
       * @param {?} duration
       * @param {?} delay
       * @param {?} easing
       * @param {?} previousPlayers
       */
      constructor(element, keyframes, duration, delay, easing, previousPlayers) {
          super(duration, delay);
          this.element = element;
          this.keyframes = keyframes;
          this.duration = duration;
          this.delay = delay;
          this.easing = easing;
          this.previousPlayers = previousPlayers;
          this.__finished = false;
          this.__started = false;
          this.previousStyles = {};
          this._onInitFns = [];
          this.currentSnapshot = {};
          if (ɵallowPreviousPlayerStylesMerge(duration, delay)) {
              previousPlayers.forEach(player => {
                  if (player instanceof MockAnimationPlayer) {
                      /** @type {?} */
                      const styles = player.currentSnapshot;
                      Object.keys(styles).forEach(prop => this.previousStyles[prop] = styles[prop]);
                  }
              });
          }
      }
      /* @internal */
      /**
       * @param {?} fn
       * @return {?}
       */
      onInit(fn) { this._onInitFns.push(fn); }
      /* @internal */
      /**
       * @return {?}
       */
      init() {
          super.init();
          this._onInitFns.forEach(fn => fn());
          this._onInitFns = [];
      }
      /**
       * @return {?}
       */
      finish() {
          super.finish();
          this.__finished = true;
      }
      /**
       * @return {?}
       */
      destroy() {
          super.destroy();
          this.__finished = true;
      }
      /* @internal */
      /**
       * @return {?}
       */
      triggerMicrotask() { }
      /**
       * @return {?}
       */
      play() {
          super.play();
          this.__started = true;
      }
      /**
       * @return {?}
       */
      hasStarted() { return this.__started; }
      /**
       * @return {?}
       */
      beforeDestroy() {
          /** @type {?} */
          const captures = {};
          Object.keys(this.previousStyles).forEach(prop => {
              captures[prop] = this.previousStyles[prop];
          });
          if (this.hasStarted()) {
              // when assembling the captured styles, it's important that
              // we build the keyframe styles in the following order:
              // {other styles within keyframes, ... previousStyles }
              this.keyframes.forEach(kf => {
                  Object.keys(kf).forEach(prop => {
                      if (prop != 'offset') {
                          captures[prop] = this.__finished ? kf[prop] : AUTO_STYLE;
                      }
                  });
              });
          }
          this.currentSnapshot = captures;
      }
  }
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  
  /**
   * Generated bundle index. Do not edit.
   */
  
  export { MockAnimationDriver, MockAnimationPlayer };
  //# sourceMappingURL=testing.js.map
  