import type { ScanOrderOrderProduct } from '../types'; export interface DiscountCardHolderContext { discount: any; machineCode: Record; machineCodeId: number | string; formId: number | string; currentHolderId?: number | string | null; } export interface BuildMachineCodeHolderPayloadOptions { holderId: number | string; customerId?: number | string; } export declare function isDiscountCardApplied(discount: any): boolean; export declare function pickDiscountCardMachineCode(discount: any): Record | null; export declare function resolveDiscountCardHolderContext(discount: any): DiscountCardHolderContext | null; export declare function getDiscountCardMachineCodeId(discount: any): number | string | null; export declare function getDiscountHolderActionKey(discount: any): string; export declare function shouldPromptHolderForDiscountCard(discount: any): boolean; export declare function patchDiscountCardHolder(discount: any, holderId: number | string): any; /** * 将 OS 折扣列表中目标 machinecode 写入 holder_id。 */ export declare function patchDiscountListHolderByTarget(list: any[], targetDiscount: any, holderId: number | string): any[]; interface SyncDiscountCardHolderInStoreParams { getDiscountList: () => any[]; getOriginalDiscountList?: () => any[]; replaceDiscountStoreLists: (params: { discountList: any[]; originalDiscountList?: any[]; }) => Promise; targetDiscount: any; holderId: number | string; } /** 绑定 Holder 后同步更新 OS Discount 模块的 discountList 与 originalDiscountList。 */ export declare function syncDiscountCardHolderInStore(params: SyncDiscountCardHolderInStoreParams): Promise; export declare function buildMachineCodeHolderPayload(context: DiscountCardHolderContext, options: BuildMachineCodeHolderPayloadOptions): { encoded: any; code: any; customer_id: any; reserved_mobile: any; reserved_name: any; limit_status: any; status: any; sales_status: any; holder_id: string | number; }; export declare function shouldSkipCustomerRepriceForDiscountedLine(line: ScanOrderOrderProduct): boolean; export {};