import type { ResolveBestAddTimePlanResult } from '../types';
export declare type AdjustTimeActionType = 'payOvertime' | 'product' | 'manualDuration' | 'restart';
export interface AdjustTimeBookingSnapshot {
    id?: string | number;
    title: string;
    cover?: string;
    start: Date | string;
    end: Date | string;
    /** 原预约时长，单位分钟；Restart 应优先用它计算新结束时间。 */
    duration?: number;
    paidAmount: number;
    quantity?: number;
}
export interface AdjustTimeProduct {
    id: string | number;
    title: string;
    price: number;
    minMinutes?: number;
    maxMinutes?: number;
    unitMinutes?: number;
    unlimited?: boolean;
    /** 原始加时商品快照，checkout 时用于写入购物车。 */
    _originalProduct?: Record<string, any>;
}
export interface AdjustTimePricingLine {
    productId: string | number;
    productTitle: string;
    minutes: number;
    quantity: number;
    unitPrice: number;
    totalPrice: number;
    unlimited?: boolean;
}
export interface AdjustTimePricingResult {
    available: boolean;
    unavailableReason?: 'NO_PRODUCTS' | 'NO_COVERAGE';
    targetMinutes: number;
    coveredMinutes: number;
    totalPrice: number;
    lines: AdjustTimePricingLine[];
}
export interface AdjustTimeCheckoutResult {
    actionType: AdjustTimeActionType;
    bookingId?: string | number;
    newStart: Date;
    newEnd: Date;
    addedMinutes: number;
    autoPricing: ResolveBestAddTimePlanResult;
    dueAmount: number;
    manualDueAmount?: number;
    selectedProductId?: string | number;
}
export interface AdjustTimeModalProps {
    open: boolean;
    booking: AdjustTimeBookingSnapshot;
    products: AdjustTimeProduct[];
    /** 资源当日可用结束时刻，用于 unlimited 补至营业结束计算 */
    resourceEndTime?: Date | string;
    /** 店铺营业结束时刻，优先使用当前运行时配置，避免依赖旧页面写入的 localStorage 缓存。
     *
     * @example
     * <AdjustTimeModal shopClosingTime="18:00" />
     */
    shopClosingTime?: string;
    currencySymbol?: string;
    orderTotalAmount?: number;
    orderPaidAmount?: number;
    /** 可打开选择弹窗的票总数，仅用于控制票数入口展示，不参与金额计算。 */
    selectableTicketCount?: number;
    onCancel?: () => void;
    /** 返回上一层选票弹窗，多张可选票场景才会展示入口。 */
    onBack?: () => void;
    /** 保存调整结果，不进入 checkout。
     *
     * @example
     * <AdjustTimeModal onSave={(result) => submitAndRefresh(result)} />
     */
    onSave?: (result: AdjustTimeCheckoutResult) => void;
    onCheckout?: (result: AdjustTimeCheckoutResult) => void;
    onTicketCountClick?: () => void;
}
