UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

59 lines (58 loc) 2.26 kB
import { CartItemGroup, CartItemOption, CartItemOptions, CartLevels, ConfigDisplaySetting } from '@open-tender/types'; export declare const useModifier: (group: CartItemGroup, option: CartItemOption, levels: CartLevels | undefined, toggleOption: (levels: CartLevels) => void, incrementOption: (levels: CartLevels) => void, decrementOption: (levels: CartLevels) => void, setOptionQuantity: (levels: CartLevels, quantity: number, nested?: CartItemOptions) => void, allergenAlerts: string[], displaySettings?: ConfigDisplaySetting) => { price: string | null; cals: number | null; tags: string[]; allergens: string[]; optionGroups: import("@open-tender/types").CartItemGroups | null; showImage: boolean; showDescription: boolean; hasCals: boolean; hasIngredients: boolean; hasInfo: boolean; allergenAlert: boolean; bgStyle: { backgroundImage: string; } | undefined; isCheckbox: boolean; isRadio: boolean; showGroups: boolean; toggle: () => void; adjust: (quantity: number) => void; increment: () => void; decrement: () => void; incrementDisabled: boolean; decrementDisabled: boolean; updatedLevels: CartLevels; optionAtMax: boolean; groupAtMax: boolean; oneOnly: boolean; allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined; description: string | null; groups: import("@open-tender/types").CartItemGroups; id: number; imageUrl: string | null; appImageUrl?: string | null | undefined; ingredients: string | null; isDefault: boolean; isSoldOut: boolean; max: number; min: number; name: string; nutritionalInfo: import("@open-tender/types").NutritionalInfo | null; points: number | null; pos_ext_id: string | null; quantity: number; shorthand: string | null; shortDescription: string | null; shortName: string; slug: string; suspend_until: number | null; tags_list?: import("@open-tender/types").MenuItemTags | undefined; totalAllergens: string[]; totalCals: number | null; totalPoints: number | null; totalPrice: number | null; itemShape: import("@open-tender/types").PizzaShape | null; excludeFromBuilder: boolean; };