import type { ContainerProps, CurrencyDisplayType } from '../../types/props.js'; export declare function formatVariantPrice({ amount, baseAmount, currencyCode, currencyDisplay, locale, maximumFractionDigits, minimumFractionDigits, removeTrailingZeros, }: { baseAmount: number; amount: number; currencyCode: string; currencyDisplay?: CurrencyDisplayType; locale: string; maximumFractionDigits?: number; minimumFractionDigits?: number; removeTrailingZeros?: boolean; }): { price: string; basePrice: string; discount: string; discountAmount?: undefined; } | { price: string | null; basePrice: string | null | undefined; discount: string | null; discountAmount: string | null | undefined; }; type EventType = { primaryButton?: (v: any, index: number, data: ShelfDisplayType, coupon: any) => void; secondaryButton?: (v: any, index: number, data: ShelfDisplayType, coupon: any) => void; }; export interface ShelfDisplayItem { custom_primary_link?: string; custom_secondary_link?: string; id?: string; /** 产品图片*/ img?: { url: string; }; handle?: string; sku?: string; /** 折扣后价格*/ price?: string; title?: string; /** 折扣前价格*/ basePrice?: string; subTitle?: string; /** 标签*/ tagItems?: string[]; tab?: string; data?: ShelfDisplayItem[]; custom_name?: string; custom_description?: string; custom_image?: string; custom_theme?: string; } export type ShelfDisplayType = { title?: string; isShowTab?: boolean; isShowTag?: boolean; isShowRecommendedCard?: boolean; isShowOriginalPrice?: boolean; direction?: 'horizontal' | 'vertical'; align?: 'left' | 'center' | 'right'; productsTab?: any[]; productsCard?: any[]; /** 卡片形状 */ itemShape?: 'round' | 'square'; /** 按钮形状 */ shape?: 'round' | 'square'; /** 标签页形状*/ tabShape?: 'rounded' | 'square'; /** 主按钮配置 */ primaryButton?: string; primaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'; /** 副按钮配置 */ secondaryButton?: string; secondaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'; theme?: 'light' | 'dark'; containerProps?: ContainerProps; }; export interface ShelfDisplayProps extends React.HTMLAttributes { data: ShelfDisplayType; buildData?: { categories: any[]; products: any[]; }; recommendedData?: any[]; /** * 按钮事件 * @deprecated 请使用 onAddCart / onBuyNow / onLearnMore 配合 primaryFun / secondaryFun 替代 */ event?: EventType; key?: string; target?: '_self' | '_blank'; breakpoints?: { [key: number]: { spaceBetween: number; freeMode: boolean; slidesPerView: number; }; }; metafields?: any; isDisplayGudgments?: boolean; isDisplayBackImage?: boolean; /** 加入购物车回调 */ onAddCart?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void; /** 立即购买回调 */ onBuyNow?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void; /** 了解更多回调 */ onLearnMore?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void; } export {};