import { AnyTag, ContainerTag, ElementProps, LottieInstance, LottieRenderer } from "./types.cjs";
//#region src/animation/LottieDisplay.d.ts
/** What this component owns. Every other prop belongs to the element. */
interface LottieDisplayOwnProps {
  /** The animation to draw. Omit it inside a component that publishes one. */
  lottie?: LottieInstance;
  /** Which element to render. A `div` unless you say otherwise. */
  as?: unknown;
  /**
   * Never any: lottie-web owns what is inside the display and rebuilds it on
   * every load, so anything React put there would be wiped without warning.
   */
  children?: never;
  /** Added to the library's class rather than replacing it. */
  className?: string;
}
/**
 * What {@link LottieDisplay} accepts for a given element.
 *
 * `as` is checked against the case every renderer allows, an element that may
 * hold the `<svg>` or `<canvas>` two of the three append, because the display
 * takes an animation rather than a source and so cannot see which renderer is
 * in use. With `renderer="html"` a block element is required and nothing here
 * can enforce it.
 */
type LottieDisplayProps<As extends AnyTag = "div"> = ElementProps<LottieDisplayOwnProps, As, undefined, typeof LottieRenderer.svg>;
/**
 * The element the animation is drawn inside.
 *
 * Render it among the children of a component that publishes an animation to
 * say where the animation goes, or on its own with the result of `useLottie` to
 * place it anywhere at all. It takes every attribute of the element it renders,
 * and `ref` names that same element.
 *
 * ```jsx
 * const lottie = useLottie({ src });
 * <LottieDisplay lottie={lottie} as="section" className="h-64" />
 * ```
 */
declare const LottieDisplay: <As extends AnyTag = "div">(props: Omit<LottieDisplayOwnProps, "as"> & {
  as?: (As extends ContainerTag ? As : {
    readonly __lottie: "this tag cannot hold an animation";
  }) | undefined;
} & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<As>>, keyof LottieDisplayOwnProps> & import("react").RefAttributes<HTMLElement>) => import("react").ReactNode;
//#endregion
export { LottieDisplay, LottieDisplayProps };