import { GifsResult } from '@giphy/js-fetch-api'; import { IGif, IUser } from '@giphy/js-types'; import { Component, h, JSX } from 'preact'; import { debounce } from 'throttle-debounce'; import { EventProps } from './gif'; type Props = { className?: string; width: number; user?: Partial; columns: number; gutter: number; fetchGifs: (offset: number) => Promise; onGifsFetched?: (gifs: IGif[]) => void; onGifsFetchError?: (e: Error) => void; noResultsMessage?: string | JSX.Element; hideAttribution?: boolean; noLink?: boolean; tabIndex?: number; borderRadius?: number; } & EventProps; type State = { gifWidth: number; isFetching: boolean; isError: boolean; isDoneFetching: boolean; numberOfGifs: number; gifs: IGif[]; isLoaderVisible: boolean; }; declare class Grid extends Component { static className: string; static loaderClassName: string; static readonly defaultProps: Readonly<{ gutter: 6; user: {}; }>; static fetchDebounce: number; readonly state: Readonly<{ isFetching: false; isError: false; numberOfGifs: 0; gifWidth: 0; gifs: IGif[]; isLoaderVisible: true; isDoneFetching: false; }>; bricks?: any; el: HTMLElement | null; paginator: () => Promise; static getDerivedStateFromProps({ columns, gutter, width }: Readonly, prevState: Readonly): { gifWidth: number; } | { gifWidth?: undefined; }; setBricks(): void; componentDidMount(): void; componentDidUpdate(prevProps: Props, prevState: State): void; onLoaderVisible: (isVisible: boolean) => void; fetchGifs: debounce<(prefetchCount: any) => Promise>; onFetch: () => Promise; render({ onGifVisible, onGifRightClick, className, onGifClick, onGifHover, onGifKeyPress, onGifSeen, user, noResultsMessage, hideAttribution, noLink, tabIndex, borderRadius, }: Props, { gifWidth, gifs, isError, isDoneFetching }: State): h.JSX.Element; } export default Grid;