import { PureObject } from '../../types';
import { DishTypeServiceEnum } from '../dishes-common';
import { ReqDishesCommonParamsType, ResDishItemsMesType } from '../dishes-common/types/dishes';
import { DiscountInstListType } from '../types';

export interface ReqCaterDishParamsType {
    /**
     * 餐厅id
     */
    restId: string;
    /**
     * 菜品分类id
     */
    dishClassifyId?: string;
    /**
     * 搜索关键词 菜品、套餐名称
     */
    keyword?: string;
    /**
     * 是否上架
     */
    boolPutaway?: boolean;
}
export type ResDishItemsMap = PureObject<ResDishItemsMesType>;
export interface FunctionConfigList {
    /**
     * 配置key
     */
    keyName: KeyNameType & KeyNameTypeFunction;
    /**
     * 配置值
     */
    valueContent: '1' | '0';
}
export type KeyNameTypeFunction = "custom_goods" | "automatic_order" | "scan_pay" | "settle_accounts" | "automatic_printing";
export type KeyNameType = "amount_unit" | "restore_dining";
export interface ResOrderShoppingType {
    /**
     * id
     */
    id?: string;
    /**
     * 餐厅id
     */
    restId?: string;
    /**
     * 创建时间
     */
    createTime?: string;
    /**
     * 编号
     */
    orderNo?: string;
    /**
     * 购物车信息
     */
    mes: ReqDishesCommonParamsType;
}
export interface DiscountType {
    restId?: string;
    serviceId?: string;
    discountInstList?: DiscountInstListType[];
    dishAmountMesList?: ResDishItemsMesType[];
    customerId?: string;
    isModify?: boolean;
}
export interface CaterQueryPriceParams {
    restId?: string;
    serviceId?: string;
    discountInstId?: string;
    /** 整单优惠 */
    orderDiscountAmount?: number;
    dishAmountMesList: {
        type?: DishTypeServiceEnum;
        num?: string | number;
        dishId?: string;
        goodsSkuId?: string;
        amount?: string | number;
    }[];
    discountInstList?: DiscountInstListType[];
    dishMesList?: ResDishItemsMesType[];
}
export interface ReqOrderCaterQueryPriceParams {
    /**
     * 订单id
     */
    orderId?: string | number;
    /**
     * 客户Id
     */
    customerId?: string;
    /**
     * 餐饮列表 todo
     */
    caters?: CaterQueryPriceParams[];
    /**
    * 编辑餐饮列表
    */
    rmsInfo?: {
        addList?: CaterQueryPriceParams[];
        editList?: CaterQueryPriceParams[];
    };
}
export interface ResOrderCaterQueryPriceType {
    /**
     * 餐饮价格
     */
    caters?: {
        dishAmountMesList: {
            uniqueId?: string;
            goodsSkuId?: string;
            actualAmount?: number;
            customAmount?: number;
            discountAmount?: number;
            originalAmount?: number;
            amount?: number;
            amountType?: string;
        }[];
        orderActualAmount?: number;
        orderOriginalAmount?: number;
    }[];
}
