import type { SalesSdkGiftSelectChoice, SalesSdkGiftSelectContext } from '../types';
/**
 * 生成赠品弹窗 context 的稳定 key，用于避免同一 pending 重复 openModal。
 *
 * @example
 * const key = buildGiftSelectContextKey(ctx);
 */
export declare function buildGiftSelectContextKey(ctx: SalesSdkGiftSelectContext): string;
/**
 * 判断当前 context 是否应打开赠品弹窗。
 * - 首次加购：候选 ≥ 2
 * - 购物车重选（mode=edit）：候选 ≥ 1 即可
 *
 * @example
 * if (shouldOpenGiftSelectModal(ctx)) openModal(mapGiftSelectContextToLegacyItem(ctx));
 */
export declare function shouldOpenGiftSelectModal(ctx: SalesSdkGiftSelectContext | null): boolean;
/**
 * SalesSdk GiftSelect context → legacy usePromotionModal item 结构。
 *
 * @example
 * openModal(mapGiftSelectContextToLegacyItem(ctx));
 */
export declare function mapGiftSelectContextToLegacyItem(ctx: SalesSdkGiftSelectContext, options?: {
    scheduleDate?: string;
}): Record<string, any>;
/**
 * legacy usePromotionModal 选中商品 → SalesSdkGiftSelectChoice[]。
 *
 * @example
 * const choices = convertLegacySelectedToChoices(selectedProducts);
 */
export declare function convertLegacySelectedToChoices(selectedProducts: any[]): SalesSdkGiftSelectChoice[];
