import { TicketBookingSecondaryDisplayConfig } from "../ticketBooking/components/ticketBooking/useTicketBookingSecondaryScreen.js";
import { ProductDisplayConfig, ProductDisplayPresetKey } from "../ticketBooking/components/ProductDisplayAdapter/types.js";
import { BaseResponsiveProps } from "../../responsive/type.js";
import { ILoadProductsParams, SalesSdkCartContextValue, SalesSdkContextValue, SalesSdkCustomerContextValue, SalesSdkProductsContextValue, SalesSdkProviderProps, SalesSdkSummaryContextValue } from "../../plus/salesSdk/types.js";
import { SaleDetailTemplate } from "../../plus/saleDetail/types.js";
import React from "react";

//#region src/components/bigSale/types.d.ts
type BigSaleMode = 'ticket' | 'retail';
type BigSaleTemplate = 'standard' | 'secondaryScreen';
interface BigSaleDataSource {
  sales: SalesSdkContextValue;
  products: SalesSdkProductsContextValue;
  customer: SalesSdkCustomerContextValue;
  cart: SalesSdkCartContextValue;
  summary: SalesSdkSummaryContextValue;
}
interface BigSaleBaseProps extends BaseResponsiveProps {
  mode?: BigSaleMode;
  tmpl?: BigSaleTemplate;
  template?: BigSaleTemplate;
  productLoadParams?: ILoadProductsParams;
  productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
  saleDetailTemplate?: SaleDetailTemplate;
  autoCreate?: boolean;
  orderId?: SalesSdkProviderProps['orderId'];
  locale?: string;
  /** 副屏场景下包裹 saleDetail 区域的额外属性（缩放、连点手势等） */
  saleDetailWrapperProps?: React.HTMLAttributes<HTMLDivElement> & {
    id?: string;
  };
  /** 副屏购物车每行展示几个商品；未传或 <=1 时保持单列 */
  cartProductsPerRow?: number;
  /** 是否在 SaleDetail 中渲染客户信息（默认 true） */
  showClient?: boolean;
}
interface BigSaleProps extends Omit<SalesSdkProviderProps, 'children' | 'osKey'>, Pick<BigSaleBaseProps, 'className' | 'style' | 'mode' | 'tmpl' | 'template' | 'productLoadParams' | 'productDisplayConfig' | 'saleDetailTemplate' | 'autoCreate'> {
  osKey?: SalesSdkProviderProps['osKey'];
  secondaryScreenDisplay?: TicketBookingSecondaryDisplayConfig;
  children?: React.ReactNode;
}
//#endregion
export { BigSaleBaseProps, BigSaleDataSource, BigSaleMode, BigSaleProps, BigSaleTemplate };