import type { ComponentType } from 'react'; import React from 'react'; import type { StateStore } from '@stream-io/state-store'; import type { PaginatorState } from 'stream-chat'; import type { InfiniteScrollPaginatorProps } from './InfiniteScrollPaginator'; /** Structural view of a paginator, to avoid coupling to `BasePaginator`'s generic variance. */ type PaginatorLike = { hasMoreHead: boolean; hasMoreTail: boolean; state: StateStore>; /** * The item's identity in the paginator, used as the React key. Needed where `id` is not unique: a * channel's `id` is unique only within its type, so a channel paginator keys by `cid`. */ getItemId?: (item: TItem) => string; }; export type InfiniteScrollWithComponentsProps = InfiniteScrollPaginatorProps & { EmptyListIndicator: React.ComponentType; EndReachedIndicator: React.ComponentType<{ hasEnded: boolean; reached: 'top' | 'bottom'; }>; FirstPageLoadingIndicator: React.ComponentType; ListItem: ComponentType<{ item: TItem; }>; LoadingNextPageIndicator: React.ComponentType<{ isLoading?: boolean; }>; paginator: PaginatorLike; hasReachedBottom?: (paginator: PaginatorLike) => boolean; hasReachedTop?: (paginator: PaginatorLike) => boolean; }; type InfiniteScrollWithComponentsComponent = (props: InfiniteScrollWithComponentsProps) => React.ReactNode; /** * Renders a paginator-backed list with pluggable indicator and item components, driven by the * paginator's `state`. The ref points to the scroll root element. */ export declare const InfiniteScrollWithComponents: InfiniteScrollWithComponentsComponent; export {}; //# sourceMappingURL=InfiniteScrollWithComponents.d.ts.map