import { EasingFunction } from "@intelligentgraphics/ig.utilities";
export interface AnimatorOptions {
    disableSnapping?: boolean;
    /**
     * Specify the duration of a single animation period in milliseconds
     *
     * Default: 1000
     *
     * @type {number}
     */
    durationPerPeriod?: number;
    /**
     * Specify the total animation duration of a single animation in milliseconds
     *
     * (Overrules durationPerPeriod)
     *
     * @type {number}
     */
    totalDuration?: number;
    applyEasing?: EasingFunction;
    maxFPS?: number;
    /**
     * Will be called every time the current progress of the animator changes
     *
     * @param {number} progress The current percentage of the animation in the scene (not the time percentage)
     */
    onProgressChange?(progress: number): void;
}
export interface AnimationParams {
    forward: boolean;
    invertAnimationAfter?: boolean;
    /**
     * fraction of 1 value where to start from
     *
     * @type {number}
     */
    startFromProgress?: number;
}
export interface PlaybackControl {
    stop(): void;
    pause(): void;
    continue(): void;
    done: Promise<void>;
}
/**
 * Displays an animation in the specified direction
 *
 * @param {boolean} forward
 * @param {boolean} [invertAnimationAfter=false]
 * @returns {PlaybackControl}
 */
export declare const showAnimation: (componentIds: string[], animationParams: AnimationParams, animatorOptions?: AnimatorOptions | undefined) => PlaybackControl;
/**
 * Sets the animation position of all components and their interactors
 *
 * @param {("Start" | "End")} position
 */
export declare const setPosition: (components: string[], position: "Start" | "End") => void;
/**
 * Sets the current progress using the specified percentage
 *
 * (Between 0 and 1)
 *
 * @param {number} percent
 */
export declare const setProgress: (componentIds: string[], progress: number) => void;
/**
 * convenience function: return if there are components with animatable interactors
 */
export declare function hasAnimatableComponents(componentId: string): boolean;
export declare class Animator {
    private options;
    private api;
    private components;
    private maxPeriods;
    private currentTimeProgress?;
    private currentProgress;
    constructor(componentIds: string[], options?: AnimatorOptions);
    /**
     * return if there are components with animatable interactors
     */
    hasAnimatableComponents(): boolean;
    /**
     * Displays an animation in the specified direction
     *
     * @param {AnimationParams} {
     * 		forward,
     * 		invertAnimationAfter = false,
     * 		startFromProgress = forward ? 0 : 1,
     * 	}
     * @returns {PlaybackControl}
     */
    showAnimation({ forward, invertAnimationAfter, startFromProgress, }: AnimationParams): PlaybackControl;
    /**
     * Sets the animation position of all components and their interactors
     *
     * @param {("Start" | "End")} position
     */
    setPosition(position: "Start" | "End"): void;
    /**
     * Retrieves the current progress percentage
     *
     * (Between 0 and 1)
     *
     * @returns
     */
    getProgress(): number;
    /**
     * Sets the current progress using the specified percentage
     *
     * (Between 0 and 1)
     *
     * @param {number} percent
     */
    setProgress(percent: number): void;
    protected stepTo(percent: number): void;
    private saveComponentAnimationPosition;
    /**
     * Gets the stage of the interactor
     *
     * @private
     */
    private getInteractorStage;
    /**
     * Get the interactor periodcount
     *
     * @private
     */
    private getInteractorPeriod;
    /**
     * Finds all interactors which can be animated
     *
     * @private
     * @param {string[]} componentIds
     */
    private findAnimatableComponents;
}
