import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { AnimationPlayerRepository } from '../../services/animation-player/animation-player.repository'; /** * Use the animate directive to control all of the keyed animate directives applied on the same element. */ export declare class AnimateDirective implements OnDestroy, AfterViewInit { private readonly _ANIMATION_PLAYER_REPOSITORY; private readonly _ELEMENT; /** * Animation end event. */ animationEnd: EventEmitter; /** * Animation loop end event. */ animationLoopEnd: EventEmitter; /** * The default animation data. */ animationParameters: string | string[]; /** * Animation progress event. */ animationProgress: EventEmitter; /** * Animation start event. */ animationStart: EventEmitter; /** * The key of the animation to play automatically. */ autoPlay: string; /** * Disables the animation if true. */ disabled: boolean; /** * Enables animation looping if true. */ loop: boolean; /** * Animation progress timeout. */ progressTimeout: number; /** * New animation play erases the current playing animation if true. */ replace: boolean; /** * The default animation state. */ state: string; /** * Animating current value; */ private _animating; /** * The current index among the playable keys. */ private _keyIndex; /** * Animation looping state. */ private _looping; /** * Animation progress observable subscription. */ private _progressSubscriptions; /** * Creates a new {@link AnimateDirective} instance. * @param _ANIMATION_PLAYER_REPOSITORY - THe animation player repository to inject. * @param _ELEMENT - The element to animate. */ constructor(_ANIMATION_PLAYER_REPOSITORY: AnimationPlayerRepository, _ELEMENT: ElementRef); /** * Add an animation to the animated element. * @param key - The key of the animation to add. * @param animations - The associated animations data. */ addAnimation(key: string, animations: string[]): void; /** * Initializes the component after template loading. */ ngAfterViewInit(): void; /** * Destroys the component. */ ngOnDestroy(): void; /** * Play the animation matching the given key. * @param keys - The keys of the animation to play. */ play(...keys: string[]): void; /** * Stops animation looping. */ stop(): void; /** * Callback for animation player done event. * @param key - The key of the ended animation. */ private readonly _playerDone; /** * Callback for animation player start event. * @param key - The key of the started animation. */ private readonly _playerStart; /** * Select the next key to play. * @param keys - The playable keys. */ private selectKey; }