import type { BaseSalesOrderProduct } from '../../BaseSales';
import type { ISalesBooking } from '../../BaseSales/utils/parseSalesResponse';
import type { BookingTicketCartView, BookingTicketCustomerView, ICustomer } from '../types';
import type { ScanOrderTempOrder } from '../../ScanOrder/types';
/**
 * 仅按 booking.product_uid 建索引，避免发明 booking 与商品行之间的其它等价关系。
 */
export declare function indexBookingsByProductUid(bookings: ISalesBooking[] | undefined | null): Record<string, ISalesBooking[]>;
/**
 * 构建购物车 UI 视图：bookings 平铺附带关联商品；items 仅含未关联 booking 的商品行。
 *
 * 商品行直接透传 tempOrder.products，不做 enrichment。
 * 关联规则（1:1）：booking.product_uid ↔ line.metadata.unique_identification_number；
 * 同一 uid 已被更早的 booking 占用时，后续 booking 的 product 为 null。
 */
export declare function buildCartView(lines: BaseSalesOrderProduct[] | undefined | null, bookings: ISalesBooking[] | undefined | null): BookingTicketCartView;
export declare function isWalkInCustomer(customer: Pick<ICustomer, 'id'> | null | undefined): boolean;
/**
 * selected 优先，缺失时回退 tempOrder.customer_*，统一输出 UI 客户视图。
 */
export declare function buildCustomerView(selected: ICustomer | null | undefined, tempOrder: ScanOrderTempOrder | null | undefined): BookingTicketCustomerView | null;
