import React from 'react'; import type { ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native'; import type { CommerceTypes } from '../../../../libs/fscommerce'; import type { ButtonProps, SerializableFSButtonProps } from '../Button'; import type { SerializableStepperProps, StepperProps } from '../Stepper'; interface BaseVariantCartItemProp extends CommerceTypes.CartItem { /** * Additional props that can be applied to the 'move to wishlist' button */ wishlistButtonProps?: Partial; /** * Additional props that will be provided to the stepper */ stepperProps?: Partial; /** * Styles to apply to the main container */ style?: StyleProp; /** * Styles to apply to the product item title */ titleStyle?: StyleProp; /** * Styles to apply to the left column container * (eg. the column with the product image and move to wishlist button) */ leftColumnStyle?: StyleProp; /** * Styles to apply to the right column container * (eg. the column with the product details and qty stepper) */ rightColumnStyle?: StyleProp; productImageStyle?: StyleProp; originalPriceStyle?: StyleProp; priceStyle?: StyleProp; /** * Text styles that will apply to the price if the item's price is less than originalPrice */ salePriceStyle?: StyleProp; /** * Text styles that will apply to the item variant detail label (eg. 'Size') */ itemDetailLabelStyle?: StyleProp; /** * Text styles that will apply to the item variant detail value (eg. 'Small') */ itemDetailValueStyle?: StyleProp; outOfStockTextStyle?: StyleProp; stepperStyle?: StyleProp; } export interface VariantCartItemProps extends BaseVariantCartItemProp { /** * A function to invoke when the user wants to modify the quantity of an item in cart. */ onQtyChange?: (itemId: string, qty: number) => Promise; /** * A function to invoke when the user wants move the item to their wishlist. * * The move to wishlist button will only display if this is provided. */ onMoveToWishlist?: (item: CommerceTypes.CartItem) => void; /** * A callback to invoke if the user taps on the image */ onImagePress?: (item: CommerceTypes.CartItem) => void; } export interface SerializableVariantCartItemProps extends BaseVariantCartItemProp { wishlistButtonProps?: Partial; stepperProps?: Partial; style?: ViewStyle; titleStyle?: TextStyle; leftColumnStyle?: ViewStyle; rightColumnStyle?: ViewStyle; productImageStyle?: ImageStyle; originalPriceStyle?: TextStyle; priceStyle?: TextStyle; salePriceStyle?: TextStyle; itemDetailLabelStyle?: TextStyle; itemDetailValueStyle?: TextStyle; outOfStockTextStyle?: TextStyle; stepperStyle?: ViewStyle; } export declare const VariantCartItem: React.FC; export {};