import { Store } from '@ngrx/store'; import { SavedCartFacade } from '@spartacus/cart/saved-cart/root'; import { Cart, EventService, MultiCartService, StateUtils, StateWithMultiCart, StateWithProcess, UserIdService, UserService } from '@spartacus/core'; import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export declare class SavedCartService implements SavedCartFacade { protected store: Store>; protected userIdService: UserIdService; protected userService: UserService; protected multiCartService: MultiCartService; protected eventService: EventService; constructor(store: Store>, userIdService: UserIdService, userService: UserService, multiCartService: MultiCartService, eventService: EventService); /** * Loads a single saved cart */ loadSavedCart(cartId: string): void; /** * Gets a single saved cart * it won't emit if the delete saved cart event gets triggered to avoid race condition between actions * * @param cartId * @returns observable with cart */ get(cartId: string): Observable; /** * Gets the selected cart state * * @param cartId * @returns observable of selected cart with loader state */ getSavedCart(cartId: string): Observable>; /** * Returns true when there are no operations on that in progress and it is not currently loading * * @param cartId */ isStable(cartId: string): Observable; /** * Loads a list of saved carts */ loadSavedCarts(): void; /** * Gets a list of saved carts * * @returns observable with list of saved carts */ getList(): Observable; /** * Gets a list of saved carts from all carts in the state * by filtering through the carts that are not wishlist and not saved cart * * @returns observable with list of saved carts */ getSavedCartList(): Observable; /** * Gets the loading flag of getting a list of saved carts * * @returns observable with boolean of the loading state */ getSavedCartListProcessLoading(): Observable; /** * Gets the loading state of getting a list of saved carts * * @returns observable with boolean of the loader state */ getSavedCartListProcess(): Observable>; /** * Clears the process state of performing a saved cart */ clearSavedCarts(): void; /** * Triggers a restore saved cart * * @param cartId */ restoreSavedCart(cartId: string): void; /** * Gets the loading state of restoring saved cart * * @returns observable with boolean of the loading state */ getRestoreSavedCartProcessLoading(): Observable; /** * Gets the success state of restoring saved cart * * @returns observable with boolean of the success state */ getRestoreSavedCartProcessSuccess(): Observable; /** * Gets the error state of restoring saved cart * * @returns observable with boolean of the error state */ getRestoreSavedCartProcessError(): Observable; /** * Clears the process state of performing a restore saved cart */ clearRestoreSavedCart(): void; /** * Triggers delete saved cart * @param cartId */ deleteSavedCart(cartId: string): void; /** * Triggers a saved cart * */ saveCart({ cartId, saveCartName, saveCartDescription, }: { cartId: string; saveCartName?: string; saveCartDescription?: string; }): void; /** * Gets the loading state of saving a cart * * @returns observable with boolean of the loading state */ getSaveCartProcessLoading(): Observable; /** * Gets the success state of saving a cart * * @returns observable with boolean of the success state */ getSaveCartProcessSuccess(): Observable; /** * Gets the error state of saving a cart * * @returns observable with boolean of the error state */ getSaveCartProcessError(): Observable; /** * Clears the process state of performing a save cart */ clearSaveCart(): void; /** * Triggers an edit saved cart * */ editSavedCart({ cartId, saveCartName, saveCartDescription, }: { cartId: string; saveCartName?: string; saveCartDescription?: string; }): void; /** * Triggers a clone saved cart * * @param cartId */ cloneSavedCart(cartId: string, saveCartName?: string): void; /** * Gets the loading state of cloning a saved cart * * @returns observable with boolean of the loading state */ getCloneSavedCartProcessLoading(): Observable; /** * Gets the success state of cloning a saved cart * * @returns observable with boolean of the success state */ getCloneSavedCartProcessSuccess(): Observable; /** * Gets the error state of cloning a saved cart * * @returns observable with boolean of the error state */ getCloneSavedCartProcessError(): Observable; /** * Clears the process state of cloning a saved cart */ clearCloneSavedCart(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }