import { AggregatedLoadingObservable } from "@configura/web-utilities"; import { DtoSyncGroupState } from "../CatalogueAPI.js"; import { _CfgProductInternal } from "../CfgProduct.js"; import { _CfgOptionInternal } from "../productConfiguration/CfgOption.js"; import { ProductLoader } from "../productLoader.js"; import { SyncGroupsApplyMode } from "./SyncGroupsApplyMode.js"; import { SyncGroupsTransaction } from "./SyncGroupsTransaction.js"; export declare type SyncCode = string; export declare type OptionCode = string; /** * Is used to apply the SyncGroups functionality on the Configuration and the other way around. * It also keeps the SyncState. */ export declare class SyncGroupsHandler { private _syncState; readonly updateMode: SyncGroupsApplyMode; private readonly _loadingObservable; private _currentTransaction; /** * @param verboseLogging Set to true to get verbose sync state changes logged to the console. */ static make(updateMode?: SyncGroupsApplyMode, loadingObservable?: AggregatedLoadingObservable, initial?: DtoSyncGroupState, verboseLogging?: boolean): SyncGroupsHandler; private constructor(); /** Please note that clones will use the same loadingObservable as their source. */ clone(): SyncGroupsHandler; getCompactSyncGroupState(): DtoSyncGroupState; /** Overwrites the sync state */ setCompactSyncGroupState(s: DtoSyncGroupState): void; get verboseLogging(): boolean; set verboseLogging(v: boolean); /** * Used to initially apply the sync state onto a new product so that it is "in sync" * and to reapply the sync state when an optional additional product is selected. */ init(product: _CfgProductInternal, productLoader: ProductLoader): Promise; /** * Used when an Option is selected or deselected to apply all consequences of the sync groups. * Can cause multiple extra validation calls to the server. */ selectOption(product: _CfgProductInternal, option: _CfgOptionInternal, on: boolean, productLoader: ProductLoader): Promise; private _pending; private setPending; get pending(): _CfgOptionInternal | undefined; private newTransaction; private closeTransaction; commitTransaction(transaction: SyncGroupsTransaction): Promise; } //# sourceMappingURL=SyncGroupsHandler.d.ts.map