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; user: Partial; gifHeight: number; gifWidth?: number; gutter: number; fetchGifs: (offset: number) => Promise; onGifsFetched?: (gifs: IGif[]) => void; noResultsMessage?: string | JSX.Element; hideAttribution?: boolean; noLink?: boolean; tabIndex?: number; borderRadius?: number; } & EventProps; type State = { isFetching: boolean; numberOfGifs: number; gifs: IGif[]; isLoaderVisible: boolean; isDoneFetching: boolean; }; declare class Carousel extends Component { static className: string; static readonly defaultProps: Readonly<{ gutter: 6; user: {}; }>; readonly state: Readonly<{ isFetching: false; numberOfGifs: 0; gifs: IGif[]; isLoaderVisible: true; isDoneFetching: false; }>; el?: HTMLElement; paginator: () => Promise; componentDidMount(): void; onLoaderVisible: (isVisible: boolean) => void; onFetch: debounce<() => Promise>; render({ onGifVisible, onGifRightClick, gifHeight, gifWidth, gutter, className, onGifClick, onGifHover, onGifKeyPress, onGifSeen, user, noResultsMessage, hideAttribution, noLink, tabIndex, borderRadius, }: Props, { gifs }: State): h.JSX.Element; } export default Carousel;