import { OrderModule, ProductList, SalesSummaryModule, ScanOrderLogInput, ScanOrderLoggerModule, ScanOrderLoggerProviderConfig, ScanOrderLoggerProviderType, DateModule, ScheduleModule, QuotationModule, OpenDataModule } from '../../modules';
import type { QuantityCheckResult, QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
export type { ScanOrderOrderProductIdentity, ScanOrderOrderProduct, ScanOrderSubmitProduct, ScanOrderSummary, ScanOrderTempOrder, ScanOrderSubmitPayload, } from '../ScanOrder/types';
export declare enum VenueBookingHooks {
    onInited = "venueBooking:onInited",
    onDestroy = "venueBooking:onDestroy",
    onRetryInit = "venueBooking:onRetryInit",
    onRefresh = "venueBooking:onRefresh",
    onCartValidationChanged = "venueBooking:onCartValidationChanged"
}
export type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
export interface VenueBookingEntryContext {
    biz: string;
    venueId?: string;
    sourceOrderId?: string;
}
export interface VenueBookingConfig {
    orderSource: 'local' | 'remote';
    features: {
        autoMerge: boolean;
    };
}
export interface VenueBookingSlotConfig {
    slotDurationMinutes: number;
    businessStartTime: string;
    businessEndTime: string;
    fewLeftThreshold: number;
}
export declare const DEFAULT_SLOT_CONFIG: VenueBookingSlotConfig;
export interface VenueTimeSlot {
    startTime: string;
    endTime: string;
    status: 'available' | 'occupied' | 'partially_occupied' | 'past' | 'unavailable';
    price: string | null;
    resourceId: number | string;
    resourceFormId: number | string;
    capacity: number | null;
    remainingCapacity: number | null;
    /** per-product sub-row slot 上带的 productId；外层合并 slot 不写 */
    productId?: number;
}
export interface VenueResourceSubRow {
    productId: number;
    productTitle: string;
    price: string;
    slots: VenueTimeSlot[];
}
export interface VenueResourceCombinedInfo {
    resourceIds: Array<number | string>;
}
export interface VenueResourceRow {
    resourceId: number | string;
    resourceFormId: number | string;
    resourceName: string;
    /** 单商品时取唯一 mapping.productId；多商品时取第一个 mapping（兼容字段） */
    productId: number;
    productTitle: string;
    slots: VenueTimeSlot[];
    /** 多商品共享同一场地时的子行；单商品不输出 */
    products?: VenueResourceSubRow[];
    hasMultipleProducts?: boolean;
    /** 当前资源是 combined_resource.status===1 时输出 */
    combinedResource?: VenueResourceCombinedInfo;
}
export interface VenueTimeSlotGrid {
    date: string;
    timeLabels: string[];
    resources: VenueResourceRow[];
}
export interface VenueDateSummaryItem {
    date: string;
    status: 'available' | 'few_left' | 'sold_out' | 'unavailable';
    startingPrice: string | null;
    totalSlots: number;
    availableSlots: number;
}
export interface VenueResourceCombinedRaw {
    status: number;
    resource_ids: Array<number | string>;
}
export interface VenueResourceRawData {
    resourceId: number | string;
    formId: number | string;
    main_field?: string;
    form_id?: number | string;
    resource_form_id?: number | string;
    capacity?: number;
    times: Array<{
        start_at: string;
        end_at: string;
        [key: string]: any;
    }>;
    combined_resource?: VenueResourceCombinedRaw;
    [key: string]: any;
}
export interface ResourceProductMapping {
    productId: number;
    productTitle: string;
    resourceName: string;
    formId: number | string;
    price: string;
    resourceType: 'single' | 'multiple' | 'capacity';
}
export interface VenueSlotSelection {
    resourceId: number | string;
    productId: number;
    startTime: string;
    endTime: string;
    price: string;
}
export interface MergedSlotGroup {
    startTime: string;
    endTime: string;
    totalPrice: string;
    slotCount: number;
    slots: VenueSlotSelection[];
}
export interface PriceBreakdownEntry {
    start_time: string;
    end_time: string;
    unit_price: number;
    quotation_shelf_id: number;
    quantity: number;
}
export interface VenueBookingState {
    entryContext: VenueBookingEntryContext | null;
    status: VenueBookingStatus;
    flow: Record<string, any>;
    error: string | null;
    products?: ProductList;
    order?: OrderModule;
    salesSummary?: SalesSummaryModule;
    scanOrderLogger?: ScanOrderLoggerModule;
    venueProducts?: ProductList;
    addonProducts?: ProductList;
    date?: DateModule;
    schedule?: ScheduleModule;
    quotation?: QuotationModule;
    openData?: OpenDataModule;
    rawResourceData: VenueResourceRawData[];
    slotConfig: VenueBookingSlotConfig;
    itemRuleQuantityLimits: QuantityLimitResult[];
    cartValidation: {
        passed: boolean | null;
        failures: QuantityCheckResult[];
    };
}
export interface VenueBookingLoggerRuntimeConfig {
    provider?: ScanOrderLoggerProviderType;
    providerConfig?: ScanOrderLoggerProviderConfig;
}
export interface VenueBookingAddLogParams extends ScanOrderLogInput {
}
