import type { SendEventForHits } from '.'; export type RecommendClassNames = { /** * Class names to apply to the root element */ root: string; /** * Class names to apply to the root element without results */ emptyRoot: string; /** * Class names to apply to the title element */ title: string; /** * Class names to apply to the container element */ container: string; /** * Class names to apply to the list element */ list: string; /** * Class names to apply to each item element */ item: string; }; export type RecommendTranslations = { /** * The title of the recommendation section */ title: string; /** * The label of the horizontal slider */ sliderLabel: string; }; export type RecommendLayoutProps> = { classNames: TClassNames; itemComponent: = Record>(props: RecommendItemComponentProps> & TComponentProps) => JSX.Element; items: TItem[]; sendEvent: SendEventForHits; }; export type RecommendComponentProps = Record> = { itemComponent?: (props: RecommendItemComponentProps> & TComponentProps) => JSX.Element; items: Array>; classNames?: Partial; emptyComponent?: (props: TComponentProps) => JSX.Element; headerComponent?: (props: RecommendInnerComponentProps & TComponentProps) => JSX.Element; status: RecommendStatus; translations?: Partial; sendEvent: SendEventForHits; layout?: (props: RecommendLayoutProps, Record> & TComponentProps) => JSX.Element; }; export type RecommendInnerComponentProps = { classNames: Partial; items: TObject[]; translations: Partial; }; export type RecordWithObjectID> = TObject & { objectID: string; __position: number; __queryID?: string; }; export type RecommendItemComponentProps = { item: TObject; sendEvent: SendEventForHits; onClick?: () => void; onAuxClick?: () => void; }; export type RecommendStatus = 'idle' | 'loading' | 'stalled' | 'error';