import { AnimationConfigWithData, AnimationDirection, AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';
import { default as React, AnimationEventHandler, CSSProperties, MutableRefObject, ReactElement, RefObject } from 'react';
export type LottieRefCurrentProps = {
    play: () => void;
    stop: () => void;
    pause: () => void;
    setSpeed: (speed: number) => void;
    goToAndStop: (value: number, isFrame?: boolean) => void;
    goToAndPlay: (value: number, isFrame?: boolean) => void;
    setDirection: (direction: AnimationDirection) => void;
    playSegments: (segments: AnimationSegment | AnimationSegment[], forceFlag?: boolean) => void;
    setSubframe: (useSubFrames: boolean) => void;
    getDuration: (inFrames?: boolean) => number | undefined;
    destroy: () => void;
    animationContainerRef: RefObject<HTMLDivElement>;
    animationLoaded: boolean;
    animationItem: AnimationItem | undefined;
};
export type LottieRef = MutableRefObject<LottieRefCurrentProps | null>;
export type LottieOptions = Omit<AnimationConfigWithData, 'container' | 'animationData'> & {
    animationData: unknown;
    lottieRef?: LottieRef;
    onComplete?: AnimationEventHandler | null;
    onLoopComplete?: AnimationEventHandler | null;
    onEnterFrame?: AnimationEventHandler | null;
    onSegmentStart?: AnimationEventHandler | null;
    onConfigReady?: AnimationEventHandler | null;
    onDataReady?: AnimationEventHandler | null;
    onDataFailed?: AnimationEventHandler | null;
    onLoadedImages?: AnimationEventHandler | null;
    onDOMLoaded?: AnimationEventHandler | null;
    onDestroy?: AnimationEventHandler | null;
} & Omit<React.HTMLProps<HTMLDivElement>, 'loop'>;
export type Listener = {
    name: AnimationEventName;
    handler: AnimationEventHandler;
};
export type PartialListener = Omit<Listener, 'handler'> & {
    handler?: Listener['handler'] | null;
};
export declare const useLottie: (props: LottieOptions, style?: CSSProperties) => {
    View: ReactElement;
} & LottieRefCurrentProps;
