import type { Fn0, Maybe } from "@thi.ng/api"; import type { ComponentLike, IComponent, NumOrElement } from "./api.js"; import { Component } from "./component.js"; /** * `IntersectionObserver`-based helper component for lazy * loading/initialization. Creates an initially empty wrapper element, then only * calls the given `inner` component factory function once the wrapper element * intersects the viewport (as per provided IntersectionObserver options). * * @remarks * The wrapper element MUST have an associated non-zero height (e.g. via CSS or * initial content). * * @param tag * @param attribs * @param inner * @param opts */ export declare const $lazy: (tag: string, attribs: any, inner: Fn0>, opts?: IntersectionObserverInit) => $Lazy; export declare class $Lazy extends Component { protected tag: string; protected attribs: any; protected ctor: Fn0>; protected opts?: IntersectionObserverInit | undefined; protected observer: Maybe; protected inner: Maybe; constructor(tag: string, attribs: any, ctor: Fn0>, opts?: IntersectionObserverInit | undefined); mount(parent: ParentNode, index?: NumOrElement): Promise; unmount(): Promise; } //# sourceMappingURL=lazy.d.ts.map