import { BehaviorSubject, Observable } from 'rxjs'; import { BasketEntry } from '../_models'; import { EventTrace } from '../_types/event-trace'; import { BasketsService } from './baskets.service'; import { PointOfSalesService } from './point-of-sales.service'; import { RecipesService } from './recipes.service'; import { UserService } from './user.service'; import { ContextRegistryService } from './context-registry.service'; import * as i0 from "@angular/core"; export interface ParsedMethod { method: 'addRecipeToBasket' | 'addIngredientToBasket'; arguments: { recipeId: string; guests?: number; eventTrace: EventTrace; ingredientId?: string; entry?: BasketEntry; searchString?: string; }; } export declare class PendingBasketMethodsService { private contextRegistryService; private userService; private posService; private basketsService; private recipesService; shouldExecuteBasketMethod: BehaviorSubject; private subscriptions; constructor(contextRegistryService: ContextRegistryService, userService: UserService, posService: PointOfSalesService, basketsService: BasketsService, recipesService: RecipesService); /** * Stores the method and its arguments if the user is not logged in or doesn't have a PoS Set */ storeMethodIfCallbackNeeded(method: ParsedMethod): Observable; /** * Executes a stored method if the user is logged in and has a PoS. */ private canExecuteStoredMethod; /** * Check if the user is logged in and has a point of sale. */ private hasUserAndHasPos; /** * Executes the stored method by retrieving the stored data from local storage, * parsing it, and iterating over each request. Depending on the method name, * either adds recipes to the basket or ingredients to the basket. */ private getStoredMethod; static ɵfac: i0.ɵɵFactoryDef; static ɵprov: i0.ɵɵInjectableDef; } //# sourceMappingURL=pending-basket-methods.service.d.ts.map