import { Component } from 'react'; import type { ImageStyle, ImageURISource, StyleProp, TextStyle, ViewStyle } from 'react-native'; import type { ReviewTypes } from '../../../libs/fscommerce'; import type { MoreTextProps } from './MoreText'; import type { ReviewIndicatorProps } from './ReviewIndicator'; export declare enum RecommendationDisplayTypes { Never = 0, Always = 1, PositiveOnly = 2, NegativeOnly = 3 } export interface ReviewItemProps extends ReviewTypes.Review { recommendedImage?: ImageURISource; verifiedImage?: ImageURISource; showRecommendations?: RecommendationDisplayTypes; indicateSyndicated?: boolean; renderSyndicatedIndicator?: (syndicationSource: ReviewTypes.SyndicationSource) => JSX.Element; style?: StyleProp; titleStyle?: StyleProp; userStyle?: StyleProp; rowStyle?: StyleProp; verifiedStyle?: StyleProp; verifiedImageStyle?: StyleProp; verifiedRowStyle?: StyleProp; helpfulStyle?: StyleProp; buttonStyle?: StyleProp; moreTextStyle?: StyleProp; recommendedStyle?: StyleProp; recommendedImageStyle?: StyleProp; recommendedImageBoxStyle?: StyleProp; recommendedRowStyle?: StyleProp; reviewIndicatorProps?: Partial; moreTextProps?: MoreTextProps; onHelpful?: (props: ReviewItemProps) => void; onNotHelpful?: (props: ReviewItemProps) => void; } export interface ReviewItemState { syndicatedImageHeight?: number; syndicatedImageWidth?: number; } export declare class ReviewItem extends Component { constructor(props: ReviewItemProps); private readonly onHelpful; private readonly onNotHelpful; private readonly renderSyndicatedIndicator; /** * Display whether an item is recommended or not recommended for the user. This will only be * displayed if isRecommended is a boolean, as null or undefined indicate that the feature isn't * configured in the review API. * * In addition, whether and how the recommendations are displayed is controlled by the * showRecommendations prop: * - Always (default): recommendations are displayed whether recommended or not * - PositiveOnly: recommendations are only displayed if the product is recommended * - NegativeOnly: recommendations are only displayed if the product is not recommended * - Never: recommendations are never displayed */ private readonly renderRecommendation; render(): JSX.Element; }