import { Cart, OrderEntry, UserIdService } from '@spartacus/core'; import { CartItemContext } from '@spartacus/storefront'; import { Observable } from 'rxjs'; import { CommonConfigurator } from '../../core/model/common-configurator.model'; import * as i0 from "@angular/core"; /** * Utilities for generic configuration */ export declare class CommonConfiguratorUtilsService { protected userIdService: UserIdService; constructor(userIdService: UserIdService); /** * Compiles a unique key for a configuration owner and sets it into the 'key' * attribute * @param {CommonConfigurator.Owner }owner - Specifies the owner of a product configuration */ setOwnerKey(owner: CommonConfigurator.Owner): void; /** * Composes owner ID from document ID and entry number * @param {string} documentId - ID of document the entry is part of, like the order or quote code * @param {string} entryNumber - Entry number * @returns {string} - owner ID */ getComposedOwnerId(documentId: string, entryNumber: number): string; /** * Decomposes an owner ID into documentId and entryNumber * @param {string} ownerId - ID of owner * @returns {any} object containing documentId and entryNumber */ decomposeOwnerId(ownerId: string): any; /** * Gets cart ID (which can be either its guid or its code) * @param {Cart} cart - Cart * @returns {string} - Cart identifier */ getCartId(cart?: Cart): string; /** * Verifies whether the item has any issues. * * @param {OrderEntry} cartItem - Cart item * @returns {boolean} - whether there are any issues */ hasIssues(cartItem: OrderEntry): boolean; /** * Retrieves the number of issues at the cart item. * * @param {OrderEntry} cartItem - Cart item * @returns {number} - the number of issues at the cart item */ getNumberOfIssues(cartItem: OrderEntry): number; /** * Verifies whether the configurator type is an attribute based one. * * @param {string} configuratorType - Configurator type * @returns {boolean} - 'True' if the expected configurator type, otherwise 'false' */ isAttributeBasedConfigurator(configuratorType: string | undefined): boolean; /** * Verifies whether the configurator type is a bundle based one. * * @param {string} configuratorType - Configurator type * @returns {boolean} - 'True' if the expected configurator type, otherwise 'fasle' */ isBundleBasedConfigurator(configuratorType: string | undefined): boolean; /** * Determines whether we are in the context of an active cart * @param cartItemContext Cart item context * @returns Item part of an active cart? */ isActiveCartContext(cartItemContext: CartItemContext | undefined): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }