import type { ProductData, SalesSdkAddProductResult, SalesSdkAddProductWithFlowOptions, SalesSdkAddProductWithFlowResult, SalesSdkCartItemView } from '../types';
import { type AddToCartToastApi } from '../components/showAddToCartToast';
/**
 * 预约商品（含 duration / schedules）每次点击独立加车，不参与 UI 防抖数量合并。
 *
 * @example
 * shouldBypassAddProductDebounce({ id: 1 }, { duration: { value: 30 } }); // true
 * shouldBypassAddProductDebounce({ id: 2 }, { }); // false
 */
export declare function shouldBypassAddProductDebounce(product: ProductData & Record<string, any>, cacheItem?: Record<string, any> | null): boolean;
export declare const DEFAULT_ADD_PRODUCT_DEBOUNCE_MS = 100;
export declare type AddProductOsDecision = {
    action: 'add';
    cacheItem?: any;
} | {
    action: 'requiresDetail';
    payload?: any;
    cacheItem?: any;
} | {
    action: 'requiresBookingEdit';
    payload?: any;
    cacheItem?: any;
};
export interface AddProductWithFlowDebouncedDeps {
    decideAddProduct: (product: ProductData & Record<string, any>, options?: Pick<SalesSdkAddProductWithFlowOptions, 'type' | 'quantity'>) => AddProductOsDecision;
    runAddProductFlow: (product: ProductData & Record<string, any>, options?: SalesSdkAddProductWithFlowOptions) => Promise<SalesSdkAddProductWithFlowResult>;
    addProductDirect: (product: ProductData & Record<string, any>, options?: SalesSdkAddProductWithFlowOptions) => Promise<SalesSdkAddProductResult>;
    getCartItems: () => SalesSdkCartItemView[];
    Toast?: AddToCartToastApi | null;
    defaultDebounceMs?: number;
}
/**
 * 创建带防抖的 `addProductWithFlow`：
 * - OS `decideAddProduct` 为 `requiresDetail` / `requiresBookingEdit` 时立即走完整弹窗链；
 * - 仅 `action === 'add'` 时合并数量、防抖后一次 `addProduct`（预约商品默认不合并，每次点击独立加车）；
 * - Toast 仅在加车成功（`status === 'added'`）后展示，避免 Holder / 跨日弹窗尚未完成时误提示。
 */
export declare function createAddProductWithFlowDebounced(deps: AddProductWithFlowDebouncedDeps): {
    addProductWithFlow: (product: ProductData & Record<string, any>, options?: SalesSdkAddProductWithFlowOptions) => Promise<SalesSdkAddProductWithFlowResult>;
};
