import { CartGeneralTypeEnum, IFormValues } from '../interfaces/cart'; import { IConcreteOrder, IGrassProduct } from '../interfaces/products'; import IIndexedProduct from '../../../Interfaces/Indexed/Product'; import ICart, { CartContentTypeEnum, ICartItem, ICartItemCustomPrices, ICartItemWithSubItem, IIndexedDeclination } from '../../../Interfaces/Cart'; import IInventoryItem from '../../../Interfaces/Product/IInventoryItem'; import { ICustomPriceItem } from '../../../Interfaces/G2'; import ILang from '../../../utils/string'; import Space from '../../../lib/Space'; export declare const handleAddGrassItemsCart: (cart: ICart, chosenDeclination: IIndexedDeclination, parentProduct: IIndexedProduct, isUpdating: boolean, isRecommendedUpsell: boolean, formValues: IFormValues, fetchProduct: (slug: string, locale: string | undefined, useFeeArray?: boolean, noDrafts?: boolean) => Promise, kentuckyBaseGrass: IIndexedProduct | undefined, locale: string | undefined, isPro: boolean, customPriceList?: ICustomPriceItem[], recommendedUpsellParentSlug?: string) => Promise<{ error: string; itemsToAdd?: undefined; itemsToUpdate?: undefined; itemsToDelete?: undefined; newShippingPayload?: undefined; } | { itemsToAdd: ICartItem[]; itemsToUpdate: { sku: string; qte: number; }[]; itemsToDelete: string[]; newShippingPayload: any; error?: undefined; }>; /** * Replaces ventilated installation with installation tout inclus and applies Kentucky overrides. * Used during cart verification when a pro customer has installation tout inclus but cart has ventilated installation. */ export declare const applyInstallationToutInclusToVerifiedItems: (verifiedItems: ICartItem[], customPriceList: ICustomPriceItem[] | undefined, isPro: boolean, installationParent?: IIndexedProduct) => ICartItem[]; export declare const checkIfCartContainsType: (type: CartGeneralTypeEnum, cartData: ICart, excludeUndefinedForAccessories?: boolean, excludeUndefinedForBeton?: boolean) => boolean; export declare const checkIfItemCanBeAddedToCart: (prod: IIndexedProduct, parentProdType: 'gazon' | 'beton' | 'vrac' | 'other', cartData: ICart | undefined, addToCart?: boolean, declination?: IIndexedDeclination | undefined, useParent?: boolean, autoAdd?: boolean) => { addToCart: boolean; declinationChecked?: IIndexedDeclination | undefined; error?: ILang | undefined; showForm?: boolean | undefined; }; export declare const checkIfDecliIsOkForMixedSale: (decli: IIndexedDeclination, typeToCheck: 'gazon' | 'beton' | 'vrac' | 'accessoires') => boolean; export declare const checkCartTypeBeforeAddingItem: (prod: IIndexedProduct, declination: IIndexedDeclination | undefined, cartData: ICart | undefined, forceCartType?: CartGeneralTypeEnum) => boolean; export declare const getCartType: (cartData: ICart, prioritizeInstallation?: boolean) => CartGeneralTypeEnum; /** * Finds out if a cart is for a pro customer or not * @param {ICart} invoice The cart to test * @return Returns true if the cart is pro, false if not */ export declare const isPro: (invoice: ICart) => boolean; export declare const getProTitleFromCart: (invoice: ICart) => string | undefined; export declare const orderCartItems: (cart: ICart) => ICartItem[]; export declare const getConcreteCartInfo: (cartData: ICart, fetchInventoryItem: (sku: string) => Promise, pickupStoreId?: string, inventoryItemsArray?: IInventoryItem[]) => Promise; /** * Function getGrassProduct * @description - Create the essential info needed when checking a grass type product for cart * @param item */ export declare const getGrassProductForCart: (item: ICartItem | undefined) => IGrassProduct | undefined; export declare const getRecursiveItems: (cartItems: ICartItem[], cartContainsGrass?: boolean, keepFees?: boolean, groupSurcharges?: boolean) => ICartItemWithSubItem[]; export declare const getRecursiveItemsFromSubItems: (item: ICartItemWithSubItem) => ICartItemWithSubItem[]; /** * Get price applied for item in cart. Corresponds to the unit price that the customer paid. * @param {Space} space * @param {ICartItem} item * @param {ICart} cartData * @param {boolean} options.isBookingBeton Optionnal. Always returns regular price if true (additionnal check) * @param {boolean} options.getLowest Optionnal. If true, always returns the lowest amount found between all cart item prices, with no other checks. * @returns */ export declare const getAppliedPrice: (item: ICartItem, options?: { isBookingBeton?: boolean; getLowest?: boolean; }) => number; export declare const getLowestAppliedPrice: (item: ICartItem) => import("../../../Interfaces/Cart").ICartItemPrices; /** * Checks if the specific item price contains an "escompte" * @param {ICartItemCustomPrices} price The price to check, Either the discount_price of promo_price of a cart item. * @returns */ export declare const checkPriceForEscompte: (price: ICartItemCustomPrices) => boolean; /** * Calculates the percent applied from a discount on a cart item. If promo_price set, checks promo_price, else checks discount_price. * @param {ICartItem} item * @param {boolean} isPro * @returns */ export declare const getPercentFromReducedPrice: (item: ICartItem, isPro: boolean) => number | undefined; /** * Returns the customer's Client Number to show in order slip and invoice. * @param cartData * @param space - Must be defined to check if grass promise to purchase bank was applied to cart * @param options.isQuote - Optionnal. If current cart is a quote cart * @param options.checkIfEscPaApplied - Optionnal. If true, will only add PA suffix if some reduce PA price or item is found in cart */ export declare const getClientNumberForCart: (cartData: ICart | undefined, space: Space | undefined, options?: { isQuote?: boolean; checkIfEscPaApplied?: boolean; }) => string; export declare const getLabelForCartType: (value: CartGeneralTypeEnum | CartContentTypeEnum) => "Installation" | CartGeneralTypeEnum.BOOKING | CartGeneralTypeEnum.BOOKING_BETON | "Retour palettes" | "Accessoires seulement" | "Béton" | "Échantillons" | "Gazon" | "Vrac" | "Mixte";