import { default as EventEmitter } from '../event-emitter';
import { IAnimation, AnimationTransform } from '../animation';
import { IChromaKeyOpts } from '../clips/iclip';
import { ColorAdjustment } from '../utils/color-adjustment';
import { IClipTiming } from '@openvideo/core';
type IRectBaseProps = any;
interface IAnimationOptions {
    duration: number;
    delay?: number;
    iterCount?: number;
}
type TAnimateProps = IRectBaseProps & {
    opacity: number;
};
export type TAnimationKeyFrame = Array<[number, Partial<TAnimateProps>]>;
type TKeyFrameOptions = Partial<Record<`${number}%` | "from" | "to", Partial<TAnimateProps>>>;
export interface BaseSpriteEvents {
    propsChange: Partial<{
        left: number;
        top: number;
        width: number;
        height: number;
        angle: number;
        zIndex: number;
        opacity: number;
        volume: number;
        animations: IAnimation[];
        locked: boolean;
    }>;
    [key: string]: any;
    [key: symbol]: any;
}
/**
 * Sprite base class
 *
 * @see {@link OffscreenSprite}
 */
export declare abstract class BaseSprite<T extends BaseSpriteEvents = BaseSpriteEvents> extends EventEmitter<T> {
    /**
     * Unique identifier for the sprite/clip
     */
    id: string;
    /**
     * Name of the sprite/clip
     */
    name: string;
    /**
     * Nested timing property group (Phase 1 Refactoring)
     */
    timing: IClipTiming;
    /**
     * Control display time range of clips, commonly used in editing scenario timeline (track) module
     * from: start time offset in microseconds
     * to: end time (from + duration) in microseconds
     */
    get display(): {
        from: number;
        to: number;
    };
    set display(v: {
        from: number;
        to: number;
    });
    /**
     * Duration of the clip in microseconds
     * Cannot exceed the duration of the referenced {@link IClip}
     */
    get duration(): number;
    set duration(v: number);
    /**
     * Playback rate of current clip, 1 means normal playback
     * **Note**
     *    1. When setting playbackRate, duration must be actively corrected
     *    2. Audio uses the simplest interpolation algorithm to change rate, so changing rate will cause pitch variation, for custom algorithm please use {@link Video.tickInterceptor} to implement
     */
    get playbackRate(): number;
    set playbackRate(v: number);
    /**
     * Trim range of the source media in microseconds
     * from: start time in microseconds
     * to: end time in microseconds
     */
    get trim(): {
        from: number;
        to: number;
    };
    set trim(v: {
        from: number;
        to: number;
    });
    constructor();
    protected _left: number;
    /**
     * Left position (x coordinate)
     */
    get left(): number;
    set left(v: number);
    protected _top: number;
    /**
     * Top position (y coordinate)
     */
    get top(): number;
    set top(v: number);
    protected _width: number;
    /**
     * Width
     */
    get width(): number;
    set width(v: number);
    protected _height: number;
    /**
     * Height
     */
    get height(): number;
    set height(v: number);
    private _angle;
    /**
     * Rotation angle in degrees
     */
    get angle(): number;
    set angle(v: number);
    /**
     * Center point calculated from position and dimensions
     */
    get center(): {
        x: number;
        y: number;
    };
    private _zIndex;
    get zIndex(): number;
    /**
     * Control layering relationship between clips, clips with smaller zIndex will be occluded
     */
    set zIndex(v: number);
    private _opacity;
    /**
     * Opacity (0.0 to 1.0)
     */
    get opacity(): number;
    set opacity(v: number);
    private _volume;
    /**
     * Audio volume level (0.0 to 1.0)
     */
    get volume(): number;
    set volume(v: number);
    private _locked;
    /**
     * Whether the sprite is locked (preventing interactions)
     */
    get locked(): boolean;
    set locked(v: boolean);
    /**
     * Flip clip horizontally or vertically
     */
    flip: {
        x: boolean;
        y: boolean;
    } | null;
    effects: Array<{
        id: string;
        key: string;
        startTime: number;
        duration: number;
        targets?: number[];
    }>;
    /**
     * Chroma key settings (green screen removal)
     */
    chromaKey: IChromaKeyOpts;
    colorAdjustment: ColorAdjustment;
    /**
     * Styling properties (e.g., stroke, dropShadow, borderRadius)
     * This is a generic object to hold visual styles across different clip types
     */
    protected _style: any;
    get style(): any;
    set style(v: any);
    private animatKeyFrame;
    private animatOptions;
    private _animations;
    /**
     * List of active animations.
     * When setting this property, raw objects are automatically converted to IAnimation instances.
     */
    get animations(): IAnimation[];
    set animations(v: IAnimation[]);
    /**
     * Current transform offsets/multipliers from animations
     * Resets every frame in animate()
     */
    renderTransform: AnimationTransform;
    /**
     * @see {@link IClip.ready}
     * For clips, this should be Promise<IClipMeta>, but for BaseSprite it's just Promise<void>
     */
    protected _render(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D): void;
    /**
     * Add animation to clip, usage reference CSS animation
     *
     * @example
     * sprite.setAnimation(
     *   {
     *     '0%': { x: 0, y: 0 },
     *     '25%': { x: 1200, y: 680 },
     *     '50%': { x: 1200, y: 0 },
     *     '75%': { x: 0, y: 680 },
     *     '100%': { x: 0, y: 0 },
     *   },
     *   { duration: 4e6, iterCount: 1 },
     * );
     *
     */
    setAnimation(keyFrame: TKeyFrameOptions, options: IAnimationOptions): void;
    /**
     * If current sprite has animation set, set sprite's animation properties to state at specified time
     */
    animate(time: number, target?: any): void;
    /**
     * Add a modular animation to the clip
     * @param name Preset name or 'keyframes'
     * @param opts Animation options (duration, delay, etc.)
     * @param params Preset-specific parameters or KeyframeData
     */
    addAnimation(name: string, options: any, params?: any): string;
    /**
     * Remove an animation by ID
     */
    removeAnimation(id: string): void;
    /**
     * Clear all modular animations
     */
    clearAnimations(): void;
    /**
     * Update an existing animation by ID
     * @param id Animation ID to update
     * @param type Animation type (preset name or 'keyframes')
     * @param opts Animation options
     * @param params Preset-specific parameters or KeyframeData
     */
    updateAnimation(id: string, type: string, options: any, params?: any): void;
    /**
     * Copy current sprite's properties to target
     *
     * Used for cloning or copying state between {@link OffscreenSprite} instances
     */
    copyStateTo<T extends BaseSprite>(target: T): void;
    /**
     * Update multiple properties at once
     */
    update(updates: Partial<this>): void;
    protected destroy(): void;
}
export declare function linearTimeFn(time: number, keyFrame: TAnimationKeyFrame, options: Required<IAnimationOptions>): Partial<TAnimateProps>;
export {};
