import { Contract } from "../contract/types"; import { Product } from "../product/types"; import { BasketProduct } from "./types"; import { HapiServiceFunctionWithLifecycleHooks, WindowHapiService } from "../_window/service.types"; import { WindowHapiModuleWithConstructorArgs } from "../_window"; export type BasketServiceGetProductsHandler = (products: BasketProduct[], shouldSet?: boolean, shouldSetMeta?: boolean) => Promise<(Product | Contract)[]>; export type BasketServiceAddProductOrContractByIdHandler = (contractOrProductId: string, isProduct: boolean, showAlert?: boolean) => Promise; export type BasketServiceRemoveProductOrContractByIdHandler = (contractOrProductId: string) => void; export type BasketServiceRemoveContractsWithConflictingGroupsHandler = (contractThatUserTriedToAdd: Contract) => void; export type BasketServiceKeepContractsWithConflictingGroupsHandler = () => void; export type BasketServiceRemoveProductOrContractFromBeingAddedRemovedHandler = (contractOrProductId: string) => void; export type BasketServiceSetProductsMetaHandler = (meta: BasketProduct[]) => void; export type WindowHapiServiceBasket = WindowHapiModuleWithConstructorArgs<{ onAfterGetBasketData: (basketItemData: (Contract | Product)[], shouldSet?: boolean, shouldSetMeta?: boolean) => BasketProduct[]; setProductsMeta: BasketServiceSetProductsMetaHandler; getProducts: HapiServiceFunctionWithLifecycleHooks; addProductOrContractById: HapiServiceFunctionWithLifecycleHooks; removeProductOrContractById: HapiServiceFunctionWithLifecycleHooks; removeContractsWithConflictingGroups: HapiServiceFunctionWithLifecycleHooks; keepContractsWithConflictingGroups: HapiServiceFunctionWithLifecycleHooks; removeProductOrContractFromBeingAddedRemoved: HapiServiceFunctionWithLifecycleHooks; clear: () => BasketProduct[]; }, { readonly service: WindowHapiService; }>; //# sourceMappingURL=service.types.d.ts.map