import { Module, ModuleOptions, PisellCore } from '../../types';
import { BaseModule } from '../../modules/BaseModule';
import { ScanOrderAddLogParams, ScanOrderAvailabilityInfo, ScanOrderOrderProduct, ScanOrderOrderProductIdentity, ScanOrderScanCodeResult } from './types';
import type { UpdateOrderProductParams } from '../../modules/Order/types';
import type { Discount } from '../../modules/Discount/types';
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
import type { StrategyConfig } from '../../model/strategy/type';
import type { ProductData } from '../../modules/Product/types';
export * from './types';
interface ScanOrderItemRuleRuntimeConfig {
    strategyConfigs?: StrategyConfig[];
    pax?: Partial<PaxInfo>;
    historicalItems?: CartItemSummary[];
    serviceType?: string;
    submissionIndex?: number;
    custom?: Record<string, any>;
}
export declare class ScanOrderImpl extends BaseModule implements Module {
    protected defaultName: string;
    protected defaultVersion: string;
    isSolution: boolean;
    private initializeOptions;
    private store;
    private otherParams;
    private cacheId;
    private window;
    private request;
    private itemRuleEvaluator;
    private itemRuleConfigs;
    private itemRuleConfigsPromise;
    private itemRulePrefillApplied;
    private itemRuleRuntimeConfig;
    /** 最近一次 checkResourceAvailable 从预约规则 link 拉取的商品快照 */
    private enabledReservationRuleProducts;
    private loginEffectDisposers;
    private customerLoginRefreshInFlight;
    private customerLoginRefreshIdInFlight;
    private static readonly PISELL1_LOGIN_SUCCESS;
    private getScanOrderLoggerContext;
    private safeStringify;
    private pickErrorMessage;
    private serializeError;
    private addScanOrderLog;
    private logMethodStart;
    private logMethodSuccess;
    private logMethodError;
    private assertProductListLoaded;
    addLog(params: ScanOrderAddLogParams): Promise<void>;
    private normalizeCustomerId;
    private resolveCustomerIdFromLoginPayload;
    private clearLoginEffectListeners;
    private registerLoginEffect;
    private registerCustomerLoginListeners;
    private refreshOrderMarketingAfterLogin;
    constructor(name?: string, version?: string);
    /** 与 `otherParams.cacheId` 一致，供宿主在 URL 变化时判断是否需要重新注册模块 */
    getCacheId(): string | undefined;
    private destroyRegisteredChildModules;
    initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
    destroy(): Promise<void>;
    retryInit(): Promise<void>;
    refresh(): Promise<void>;
    getStatus(): import("./types").ScanOrderStatus;
    getEntryContext(): import("./types").ScanOrderEntryContext | null;
    getConfig(): Record<string, any>;
    getItemRuleQuantityLimits(): QuantityLimitResult[];
    getCartValidationPassed(): boolean | null;
    getCartValidation(): {
        passed: boolean | null;
        failures: QuantityCheckResult[];
    };
    getTempOrder(): import("../../modules/Order/types").OrderTempOrder | null;
    updateTempOrderNote(note: string): string;
    setPickupReferenceMode(mode: 'counter_pickup' | 'table_service'): {
        service_type: 'dine_in';
        pickup_reference_mode: 'counter_pickup' | 'table_service';
    };
    setPickupRef(buzzer: string): string;
    private ensureTempOrder;
    addNewOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
    restoreOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
    getOrderProducts(): import("../../modules/Order/types").OrderProduct[];
    getSummary(): Promise<import("../../modules/Order/types").OrderSummary>;
    getDiscountList(): Discount[];
    scanCode(code: string, customerId?: number): Promise<ScanOrderScanCodeResult>;
    setDiscountSelected(params: {
        discountId: number;
        isSelected: boolean;
    }): Promise<void>;
    onCustomerLogin(params: {
        customerId: number;
    }): Promise<void>;
    private findReservationRuleResource;
    private buildScanOrderResourceMetadata;
    private buildSubmitPayloadEnhancer;
    submitScanOrder<T = any>(): Promise<T>;
    addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
    updateOrderProduct(params: UpdateOrderProductParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
    /**
     * 设置单行商品备注（与整单 `updateTempOrderNote` 区分）。
     * 多行同 SKU 时必须传入与删除/更新一致的 identity（如 `identity_key`）。
     */
    setOrderProductLineNote(identity: ScanOrderOrderProductIdentity, note: string): Promise<import("../../modules/Order/types").OrderProduct[]>;
    removeProductFromOrder(identity: ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
    private loadRuntimeConfigs;
    private syncItemRuleConfigsFromDineInConfig;
    private fetchItemRuleConfigsByModelIds;
    private buildPrefillProductSourceMap;
    private getItemRuleRuntimeConfig;
    private ensureItemRuleConfigsLoaded;
    private refreshItemRuleQuantityLimits;
    private applyPrefillByItemRule;
    applyItemRulePrefill(): Promise<void>;
    private evaluateCartValidationByItemRule;
    private validateBeforeSubmitByItemRule;
    private refreshCartValidationPassed;
    setItemRuleRuntimeConfig(config?: ScanOrderItemRuleRuntimeConfig): Promise<void>;
    private normalizeResourceState;
    private resolveResourceSelectType;
    private fetchResourceOccupyDetailByResourceId;
    checkResourceAvailable(resourceId: string, hasOrderId: boolean): Promise<ScanOrderAvailabilityInfo>;
    getAdditionalOrderInfo(): Promise<{
        orderId: string;
        orderStatus: 'pending' | 'processing' | 'completed' | 'cancelled';
        orderTime: string;
        orderAmount: number;
        orderItems: any[];
    }>;
    getProductList(): Promise<ProductData[]>;
    getOtherParams(): Record<string, any>;
    setOtherParams(params: Record<string, any>, { cover }?: {
        cover?: boolean;
    }): Promise<void>;
    private static readonly UI_STATE_KEY_PREFIX;
    private getUIStateBucketKey;
    private readUIStateBucket;
    private writeUIStateBucket;
    setUIState(key: string, value: any): void;
    getUIState<T = any>(key: string): T | undefined;
    deleteUIState(key: string): void;
    clearUIState(): void;
    setEntryPaxNumber(number: number): Promise<void>;
    getEntryPaxNumber(): number | null;
    getFulfillmentModes(): {
        enablePickup: boolean;
        enableTableService: boolean;
    };
    checkManualPickupRef(): {
        enabled: boolean;
        manualInputType?: string;
    };
}
