import type { CommerceService, Family, LineItem, SelectedPaths, CategoryNode, CategoryNodeRole, Promo } from '../../../types'; import { type ActualLineItemSnapshot } from './actual-line-item'; import { getInstance } from './get-instance'; type StandaloneServiceOptions = { dbName: string; ordersTable: string; localStorageKey: string; }; interface StandaloneServiceSnapshot { items: ActualLineItemSnapshot[]; } declare class StandaloneService implements CommerceService { private _familyMap; private _rootNode; private _selectedPaths; private _promo; private _options; private _currentFamily; private _currentItem; constructor(families: Family[], rootNode: CategoryNode, options: StandaloneServiceOptions, serviceSnapshot?: StandaloneServiceSnapshot); getFamilyById(id: string): Family | undefined; getNodeAtPath(skuPath: string): CategoryNode | undefined; peek(skuPath: string): { role: CategoryNodeRole; family: Family | undefined; families: Family[] | undefined; node: CategoryNode | undefined; item: LineItem | undefined; } | string; getSelectedNodesAtLevel: (level: number) => CategoryNode[] | undefined; get options(): StandaloneServiceOptions; createOrder(email: string, name?: string): Promise; updateOrderShippingInfo(orderId: string, shippingInfo: any): Promise; updateOrderPaymentInfo(orderId: string, paymentInfo: any): Promise; takeSnapshot: () => StandaloneServiceSnapshot; get recentItem(): { item: LineItem; modified: number; } | undefined; private get _cartItems(); get cartItems(): LineItem[]; get cartEmpty(): boolean; get cartTotal(): number; _promoValue_unsafe(value: number): number; get promoAppliedCartTotal(): number; itemPromoPrice(item: LineItem): number | undefined; get cartQuantity(): number; get appliedPromo(): Promo | null; setAppliedPromo(promo: Promo | null): void; getItemBySku: (skuToFind: string | undefined) => LineItem | undefined; setCurrentItem: (skuToFind: string | undefined) => boolean; get item(): LineItem | undefined; get currentItem(): LineItem | undefined; setCurrentFamily(id: string | undefined): boolean; get currentFamily(): Family | undefined; get family(): Family | undefined; selectPaths(sel: SelectedPaths): Family[]; selectPath(skuPath: string): Family[]; get selectedPaths(): SelectedPaths; get selectedFamilies(): Family[]; private _reduceNode; private _processAndValidate; get selectedItems(): LineItem[]; get hasSelection(): boolean; getFamilySubtotal(familyId: string): number; } export { type StandaloneServiceOptions, type StandaloneServiceSnapshot, StandaloneService, getInstance };