import type IOSFontInfo from './IOSFontInfo'; export type ShoppingCTAButtonText = 'addToCart' | 'shopNow'; export interface ShoppingCTAButtonConfiguration { /** * The text of shopping CTA button. */ text?: ShoppingCTAButtonText; /** * The background color of CTA button. */ backgroundColor?: string; /** * The text color of CTA button. */ textColor?: string; /** * The font size of CTA button. */ fontSize?: number; /** * The iOS font info of "Add to cart" button. * The property is ignored when fontSize is not set. */ iOSFontInfo?: IOSFontInfo; } export interface LinkButtonConfiguration { isHidden?: boolean; } export type ProductCardCTAButtonText = 'shopNow' | 'buyNow'; export type ProductCardTheme = 'dark' | 'light'; export interface ProductCardPriceConfiguration { /** * Hide the price label or not. * @deprecated This property has no effect on iOS. */ isHidden?: boolean; /** * The axis of price label. * Default to 'horizontal'. * Only supported on iOS. */ axis?: ProductCardPriceLabelAxis; /** * The label configuration of price. * Only supported on iOS. */ priceLabel?: ProductCardLabelConfiguration; /** * The label configuration of original price. * Only supported on iOS. */ originalPriceLabel?: ProductCardLabelConfiguration; /** * The default display order is [priceLabel, originalPriceLabel]. When the value is `true`, the order is reversed. * Only supported on iOS. */ isPriceFirst?: boolean; } export type ProductCardPriceLabelAxis = 'horizontal' | 'vertical'; export interface ProductCardLabelConfiguration { /** * The text color of label. * Only supported on iOS. */ textColor?: string; /** * The font size of label. * Only supported on iOS. */ fontSize?: number; /** * Number of lines to show. * Only supported on iOS. * Default to 1. */ numberOfLines?: number; /** * The iOS font info. * The property is ignored when fontSize is not set. * Only supported on iOS. */ iOSFontInfo?: IOSFontInfo; } export interface ProductCardCTAButtonStyle { /** * The text color of CTA button. * Only supported on iOS. */ textColor?: string; /** * The font size of CTA button. * Only supported on iOS. */ fontSize?: number; /** * The iOS font info. * The property is ignored when fontSize is not set. * Only supported on iOS. */ iOSFontInfo?: IOSFontInfo; } export interface ProductCardIconConfiguration { /** * The corner radius of icon. * Only supported on iOS. */ cornerRadius?: number; } export interface ProductCardV2LabelConfiguration { /** * The text color of label. */ textColor?: string; } export interface ProductCardV2BorderConfiguration { /** * The border color of product card. */ color?: string; } export interface ProductCardV2PriceConfiguration { /** * The label configuration of price. */ priceLabel?: ProductCardV2LabelConfiguration; /** * The label configuration of discount. */ discountLabel?: ProductCardV2LabelConfiguration; /** * The label configuration of original price. */ originalPriceLabel?: ProductCardV2LabelConfiguration; } export interface ProductCardV2Configuration { /** * The corner radius of the v2 product card. */ cornerRadius?: number; /** * The background color of the v2 product card. */ backgroundColor?: string; /** * The border configuration of the v2 product card. */ borderConfiguration?: ProductCardV2BorderConfiguration; /** * The label configuration of the v2 product card name. */ nameLabel?: ProductCardV2LabelConfiguration; /** * The price configuration of the v2 product card. */ priceConfiguration?: ProductCardV2PriceConfiguration; } export interface ProductCardConfiguration { /** * The theme of product card. */ theme?: ProductCardTheme; /** * The corner radius of product card. */ cornerRadius?: number; /** * CTA button is hidden or not. */ isCtaButtonHidden?: boolean; /** * The text of shopping CTA button. */ ctaButtonText?: ProductCardCTAButtonText; /** * The cta button style of product card. * Only supported on iOS. */ ctaButtonStyle?: ProductCardCTAButtonStyle; /** * The price configuration of product card. */ priceConfiguration?: ProductCardPriceConfiguration; /** * The width of product card. * Only supported on iOS. */ width?: number; /** * The height of product card. * Only supported on iOS. */ height?: number; /** * The background color of product card. * Only supported on iOS. */ backgroundColor?: string; /** * The icon configuration of product card. * Only supported on iOS. */ iconConfiguration?: ProductCardIconConfiguration; /** * The label configuration of product card. * Only supported on iOS. */ nameLabel?: ProductCardLabelConfiguration; } export type VariantsHydrationStrategy = 'merge' | 'replace'; export interface ProductHydrationConfiguration { /** * Strategy used when hydrating product variants via `updateVideoProducts`. * - 'merge' (default): new variants are merged into existing ones. * - 'replace': previously hydrated variants are cleared. */ variantsHydrationStrategy?: VariantsHydrationStrategy; } export default interface ProductInfoViewConfiguration { /** * Configuration of shopping CTA button. */ ctaButton?: ShoppingCTAButtonConfiguration; /** * Configuration of link button next to shopping CTA button. */ linkButton?: LinkButtonConfiguration; /** * Configuration of product card. */ productCard?: ProductCardConfiguration; /** * Configuration of v2 product card. */ productCardV2?: ProductCardV2Configuration; /** * Configuration for how product data is hydrated. */ hydration?: ProductHydrationConfiguration; }