Home > widget-integration > RecommendationBundleEventOptions

RecommendationBundleEventOptions type

Signature:

export type RecommendationBundleEventOptions = {
	container: HTMLElement;
	model: RecommendationModel;
	formatPrice: (price: number) => string;
	calcTotalPrice: (products: RecommendationModelProperties["products"]) => number;
	buildBundleCartPayload: (products: RecommendationModelProperties["products"]) => BundleCartPayload;
	buildDropdownStyle: (rootPosition: DOMRect) => string;
	updateTotalPriceUI: (totalPrice: number, container: HTMLElement) => void;
	dropdownIndexAttribute: string;
	setOpeningDropdownIndex: (index: number) => void;
	onModelChange: (model: RecommendationModel) => void;
	attachProductLinkHandlers: (container: HTMLElement, model: RecommendationModel) => void;
};

References: RecommendationModel, RecommendationModelProperties, BundleCartPayload