import { RecordWithObjectID, TrendingFacetHit } from '@algolia/recommend-core'; import { FacetsViewProps } from './FacetsViewProps'; import { RecommendClassNames } from './RecommendClassNames'; import { RecommendStatus } from './RecommendStatus'; import { RecommendTranslations } from './RecommendTranslations'; import { Renderer } from './Renderer'; import { ViewProps } from './ViewProps'; export type ItemComponentProps = { item: TObject; } & Renderer; export type HeaderComponentProps = Renderer & ComponentProps; export type ComponentProps = { classNames: RecommendClassNames; recommendations: TObject[]; translations: RecommendTranslations; }; export type ChildrenProps = ComponentProps & { Fallback(): JSX.Element | null; Header(props: HeaderComponentProps): JSX.Element | null; status: RecommendStatus; View(props: unknown): JSX.Element; }; export type RecommendComponentProps = {}> = { itemComponent(props: ItemComponentProps> & TComponentProps): JSX.Element; items: Array>; classNames?: RecommendClassNames; children?(props: ChildrenProps & TComponentProps): JSX.Element; fallbackComponent?(props: Renderer & TComponentProps): JSX.Element; headerComponent?(props: HeaderComponentProps & TComponentProps): JSX.Element; status: RecommendStatus; translations?: RecommendTranslations; view?(props: ViewProps, Required, Record> & Renderer & TComponentProps): JSX.Element; }; export type TrendingComponentProps = {}> = { itemComponent(props: ItemComponentProps & TComponentProps): JSX.Element; items: TrendingFacetHit[]; classNames?: RecommendClassNames; children?(props: ChildrenProps & TComponentProps): JSX.Element; fallbackComponent?(props: Renderer & TComponentProps): JSX.Element; headerComponent?(props: HeaderComponentProps & TComponentProps): JSX.Element; status: RecommendStatus; translations?: RecommendTranslations; view?(props: FacetsViewProps, Record> & Renderer & TComponentProps): JSX.Element; };