import { LottieInteraction } from "./types.cjs";
//#region src/interactions/lottieInView.d.ts
/** What {@link lottieInView} can be told. */
interface LottieInViewOptions {
  /**
   * Play on the first entry and then stop watching for good, so scrolling
   * past again replays nothing. Off unless asked for.
   */
  once?: boolean;
  /**
   * How much of the animation must be visible to count as entered, `0` to
   * `1`. The default is `0`: a single visible pixel. `1` is accepted and
   * warned about, because an element taller than the viewport can never be
   * entirely visible, so a threshold of one silently never fires for it.
   */
  amount?: number;
  /**
   * Grows or shrinks the viewport the entry is measured against, in the
   * platform's own `rootMargin` grammar: px or % only.
   */
  margin?: string;
}
/**
 * Plays the animation when it scrolls into view and pauses it when it leaves,
 * or with `once`, plays on the first entry and never again.
 *
 * ```jsx
 * <LottieInteractions interactions={[lottieInView({ once: true })]}>
 *   <Lottie src={anim} autoplay={false} />
 * </LottieInteractions>
 * ```
 *
 * An entry seen while the animation is still loading plays as soon as the
 * load finishes, so an animation already on screen at page load starts by
 * itself.
 *
 * Leaving pauses rather than stops, so coming back resumes mid-motion instead
 * of restarting. The trigger never overrides a load still in flight or a
 * failed one, and it cannot tell its own pause from one a person asked for,
 * so re-entering resumes either.
 */
declare function lottieInView(options?: LottieInViewOptions): LottieInteraction;
//#endregion
export { LottieInViewOptions, lottieInView };