import { type DineroObject } from "dinero.js";
export interface AdjustmentAmount {
    amount: number;
    precision: number;
}
export interface TaxInclusion {
    systemCode: string;
    inclusive: boolean;
}
export declare enum AddonVisible {
    show = "show",
    hidden = "hidden",
    disable = "disable"
}
export interface EntityDocument {
    _rev: string;
    _id: string;
    _deleted?: boolean;
}
export interface SubDoc {
    _id: string;
}
export declare enum ADDON_GROUP_TYPE {
    DYNAMIC = "DYNAMIC",
    NORMAL = "NORMAL",
    PRODUCT = "PRODUCT"
}
export declare enum PRODUCT_TYPE {
    ALA_CARTE = "ALA_CARTE",
    SET = "SET"
}
/**
 * ALL: pos(offline) qrcode/delivery/pickup(online)
 * POS_ONLY: only visible at POS(offline), qrcode will show disable(prompt order from waiter), delivery/pickup will hide
 * NONE: POS will show disable, qrcode/delivery/pickup will hide
 */
export declare enum ORDER_FROM {
    ALL = "ALL",
    POS_ONLY = "POS_ONLY",
    NONE = "NONE"
}
export declare enum OVERRIDE_TYPE {
    PRODUCT_PRICE = "PRODUCT_PRICE",
    PRODUCT_VARIANT_PRICE = "PRODUCT_VARIANT_PRICE",
    PRODUCT_ORDER_FROM = "PRODUCT_ORDER_FROM",
    PRODUCT_NAME = "PRODUCT_NAME",
    PRODUCT_SCHEDULE = "PRODUCT_SCHEDULE",
    PRODUCT_SCHEDULE_PRICE = "PRODUCT_SCHEDULE_PRICE",
    PRODUCT_CODE = "PRODUCT_CODE",
    PRODUCT_VARIANT_CODE = "PRODUCT_VARIANT_CODE",
    PRODUCT_VARIANT_SCHEDULE_PRICE = "PRODUCT_VARIANT_SCHEDULE_PRICE",
    ADDON_AVAILABLE = "ADDON_AVAILABLE",
    ADDON_NAME = "ADDON_NAME",
    ADDON_PRICE = "ADDON_PRICE",
    ADDON_VARIANT_PRICE = "ADDON_VARIANT_PRICE",
    ADDON_ORDER_FROM = "ADDON_ORDER_FROM"
}
export declare enum SCHEDULE_FREQUENCY {
    daily = "daily",
    weekly = "weekly"
}
export declare enum SCHEDULE_DAY {
    sunday = "sunday",
    monday = "monday",
    tuesday = "tuesday",
    wednesday = "wednesday",
    thursday = "thursday",
    friday = "friday",
    saturday = "saturday"
}
export declare enum InventoryBindingType {
    sku = "SKU",
    recipe = "RECIPE"
}
export interface AddonVisibility {
    visible: AddonVisible;
    reason?: string;
}
export interface HasPosition {
    position?: number;
}
export interface ProductPriceOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_PRICE;
    value: DineroObject;
}
export interface ProductSchedulerPriceOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_SCHEDULE_PRICE;
    schedulerId: string;
    value: DineroObject;
}
export interface ProductVariantPriceOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_VARIANT_PRICE;
    combinationKey: string;
    value: DineroObject;
}
export interface ProductCodeOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_CODE;
    value: string;
}
export interface ProductVariantCodeOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_VARIANT_CODE;
    combinationKey: string;
    value: string;
}
export interface ProductVariantSchedulerPriceOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_VARIANT_SCHEDULE_PRICE;
    combinationKey: string;
    schedulerId: string;
    value: DineroObject;
}
export interface ProductOrderFromOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_ORDER_FROM;
    value: ORDER_FROM;
}
export interface ProductSchedulerOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_SCHEDULE;
    value: string;
}
export interface ProductNameOverrideOption {
    type: OVERRIDE_TYPE.PRODUCT_NAME;
    value: string;
}
export interface AddonNameOverrideOption {
    type: OVERRIDE_TYPE.ADDON_NAME;
    addonId: string;
    value: string;
}
export interface AddonAvailableOverrideOption {
    type: OVERRIDE_TYPE.ADDON_AVAILABLE;
    addonId: string;
    value: boolean;
}
export interface AddonOrderFromOverrideOption {
    type: OVERRIDE_TYPE.ADDON_ORDER_FROM;
    addonId: string;
    value: ORDER_FROM;
}
export interface AddonPriceOverrideOption {
    type: OVERRIDE_TYPE.ADDON_PRICE;
    addonId: string;
    value: DineroObject;
}
export interface AddonVariantPriceOverrideOption {
    type: OVERRIDE_TYPE.ADDON_VARIANT_PRICE;
    addonId: string;
    combinationKey: string;
    value: DineroObject;
}
export type ProductOverrideOption = ProductPriceOverrideOption | ProductSchedulerPriceOverrideOption | ProductVariantPriceOverrideOption | ProductCodeOverrideOption | ProductVariantCodeOverrideOption | ProductVariantSchedulerPriceOverrideOption | ProductOrderFromOverrideOption | ProductNameOverrideOption | ProductSchedulerOverrideOption;
export type AddonOverrideOption = AddonPriceOverrideOption | AddonVariantPriceOverrideOption | AddonNameOverrideOption | AddonAvailableOverrideOption | AddonOrderFromOverrideOption;
export interface Override {
    product: {
        [productId: string]: ProductOverrideOption[];
    };
    addon: {
        [addonGroupId: string]: AddonOverrideOption[];
    };
}
export interface VariantCombination {
    combinationKey: string;
    active: boolean;
    selectionName: string[];
    orderFrom?: ORDER_FROM;
    schedulerUsed?: string[];
    takeawayUsed?: string | null;
}
export interface Category extends HasPosition {
    name: string;
}
export interface Variant {
    name: string;
    options: VariantOption[];
}
export interface VariantOption {
    id: string;
    name: string;
}
export interface InventoryBinding {
    type: InventoryBindingType.sku | InventoryBindingType.recipe;
    id: string;
    amount: AdjustmentAmount;
    measurement?: UnitMeasurement;
}
export interface ProductTaxSetting {
    systemCode: string;
    taxCode: string;
}
export interface AddonProductBinding {
    active: boolean;
    combinationKey: string;
    /**
     * `${addonGroupId}/${addonId}`
     */
    addonKey: string;
    /**
     * Allow negative
     */
    price?: DineroObject | null;
    /**
     * Allow negative
     */
    inventoryBindings?: InventoryBinding[] | null;
    orderFrom?: ORDER_FROM;
}
export interface Product {
    code: string;
    name: string;
    name2: string;
    price: DineroObject;
    perXUnit: number | null;
    unit: string | null;
    productType: PRODUCT_TYPE;
    category: string;
    description: string | null;
    thumbnail: string | null;
    orderFrom: ORDER_FROM;
    openPrice?: boolean;
    noSst?: boolean;
    taxes?: ProductTaxSetting[];
    addonGroupUsed: string[];
    addonProductBinding: AddonProductBinding[];
    /**
     * Takeaway price when order as pickup
     */
    takeawayUsed: string | null;
    variantUsed: string[];
    variantCombination: ProductVariantCombination[];
    /**
     * Id of Schedule used by product
     */
    schedulerUsed: string | null;
    schedulers?: string[];
    /**
     * Id of department used by product
     */
    printDepartments?: string[];
    inventoryBindings?: InventoryBinding[] | null;
}
export interface ProductVariantCombination extends VariantCombination {
    codeSuffix?: string | null;
    code: string | null;
    price: DineroObject | null;
    inventoryBindings?: InventoryBinding[] | null;
}
export interface ProductAddonGroup extends AddonGroup {
    id: string;
}
export interface AddonGroup extends HasPosition {
    name: string;
    addons: Addon[];
    min: number;
    max: number;
    addonGroupType: ADDON_GROUP_TYPE;
    stackable: boolean;
    priority?: number | null;
}
/**
 * Product addon group will link all the variant
 * in some case, the variant can be override with:
 * 1. Price
 * 2. Disable
 */
export interface ProductAddonVariantCombination extends VariantCombination {
    price: DineroObject | null;
}
export interface Addon {
    id: string;
    name: string;
    name2: string;
    /**
     * for dynamic addon will default zero dinero
     */
    price: DineroObject;
    productId: string | null;
    variantCombination: ProductAddonVariantCombination[] | null;
    inventoryBindings?: InventoryBinding[] | null;
    orderFrom?: ORDER_FROM;
    app?: AddonVisibility;
    pos?: AddonVisibility;
}
/**
 * Catalog will be list of available product for filter
 * and override attribute for each value
 * all the override is store inside product itself, with override<attribute>
 *
 * eg:
 * {
 *   price: 1.2
 *   overridePrice: {
 *     [catalog.id]: 1.4
 *   }
 * }
 */
export interface Catalog {
    name: string;
    inclusiveTaxes?: TaxInclusion[] | null;
    productAvailable: string[];
    override: Override;
}
export interface PosOverride {
    override: Override;
}
export interface Duration {
    start: string;
    end: string;
}
export declare const WeekDay: {
    sunday: number;
    monday: number;
    tuesday: number;
    wednesday: number;
    thursday: number;
    friday: number;
    saturday: number;
};
export interface Scheduler {
    name: string;
    timePeriod: Duration[];
    weekDay: SCHEDULE_DAY[];
    repeat: SCHEDULE_FREQUENCY;
}
export interface Takeaway {
    name: string;
    price: DineroObject;
}
export interface UnitMeasurement {
    id: string;
    name: string;
    abbrev: string;
    conversion: AdjustmentAmount;
}
export interface Unit {
    name: string;
    abbrev: string;
    precision: number;
    measurements: UnitMeasurement[];
}
export interface SkuConvert {
    inventoryBindings: InventoryBinding[] | null;
    measurement?: string;
}
export interface Sku {
    code: string;
    name: string;
    unit: UnitDoc;
    trackingMeasurement?: string;
    convert?: SkuConvert | null;
}
export interface Recipe {
    name: string;
    contains: InventoryBinding[];
}
export interface PrintDepartment {
    name: string;
}
export interface MenuCookingGuide {
    _id: string;
    name: string;
    steps: MenuCookingStep[];
    bindings: MenuCookingStepBinding[];
}
export interface MenuCookingStep {
    id: string;
    instruction: string;
    variables: {
        [key: string]: string;
    };
}
export interface MenuCookingStepOverride {
    id: string;
    variables: {
        [key: string]: string;
    };
}
export interface MenuCookingStepBinding {
    productId: string;
    combinationKey?: string | null | undefined;
    overrides: MenuCookingStepOverride[];
}
export interface MenuCookingGuide {
    _id: string;
    name: string;
    steps: MenuCookingStep[];
    bindings: MenuCookingStepBinding[];
}
export interface MasterCatalogSetting {
    inclusiveTaxes: TaxInclusion[] | null;
}
export declare enum MenuV3ModuleKey {
    product = "product",
    category = "category",
    catalog = "catalog",
    scheduler = "scheduler",
    addonGroup = "addonGroup",
    variant = "variant",
    takeaway = "takeaway",
    unit = "unit",
    sku = "sku",
    recipe = "recipe",
    printDepartment = "printDepartment",
    cookingGuide = "cookingGuide"
}
export interface MenuV3Module {
    [MenuV3ModuleKey.product]: ProductDoc[];
    [MenuV3ModuleKey.category]: CategoryDoc[];
    [MenuV3ModuleKey.catalog]: CatalogDoc[];
    [MenuV3ModuleKey.scheduler]: SchedulerDoc[];
    [MenuV3ModuleKey.addonGroup]: AddonGroupDoc[];
    [MenuV3ModuleKey.variant]: VariantDoc[];
    [MenuV3ModuleKey.takeaway]: TakeawayDoc[];
    [MenuV3ModuleKey.unit]: UnitDoc[];
    [MenuV3ModuleKey.sku]: SkuDoc[];
    [MenuV3ModuleKey.recipe]: RecipeDoc[];
    [MenuV3ModuleKey.printDepartment]: PrintDepartmentDoc[];
    [MenuV3ModuleKey.cookingGuide]: MenuCookingGuideDoc[];
}
export interface MenuV3 {
    subModule: MenuV3Module;
    masterCatalogSetting: MasterCatalogSetting;
    updatedAt: string;
}
export interface SchedulerDoc extends SubDoc, Scheduler {
}
export interface VariantDoc extends SubDoc, Variant {
}
export interface AddonGroupDoc extends SubDoc, AddonGroup {
}
export interface ProductDoc extends SubDoc, Product {
}
export interface CatalogDoc extends SubDoc, Catalog {
}
export interface CategoryDoc extends SubDoc, Category {
}
export interface TakeawayDoc extends SubDoc, Takeaway {
}
export interface UnitDoc extends SubDoc, Unit {
}
export interface SkuDoc extends SubDoc, Sku {
}
export interface RecipeDoc extends SubDoc, Recipe {
}
export interface PrintDepartmentDoc extends SubDoc, PrintDepartment {
}
export interface MenuCookingGuideDoc extends SubDoc, MenuCookingGuide {
}
export interface MenuV3Doc extends EntityDocument, MenuV3 {
}
export interface PosOverrideDoc extends EntityDocument, PosOverride {
}
