import { KlevuRecord } from "@klevu/core"; /** * Run callback only if it hasn't been requested in last `delay` milliseconds. * * @param callback function to call * @param wait time to wait in milliseconds * @returns */ export declare function debounce(callback: (...args: T) => PromiseLike | U, wait: number): (...args: T) => Promise; /** * Strip html tags from string. * * @param html * @returns */ export declare function stripTags(html: string): string; /** * Convert markdown string to html. * * @param mdstr * @returns html */ export declare function markdown(mdstr: string): string; /** * Global settings that modify the way Klevu UI library works. */ export type KlevuUIGlobalSettings = { /** * When user clicks the product * * @param item Product that was clicked * @param event Event that triggered the click * @return false if the event should be prevented and stopped */ onItemClick?: (item: Partial, event: MouseEvent) => boolean; /** * Function to generate url for product in case using default klevu-products */ generateProductUrl?: (product: Partial) => string; /** * Generic way to render prices. By default browser currency renderer is used */ renderPrice?: (amount: number | string, currency: string) => string; /** * Replace icons with custom image based ones */ icons?: { [key: string]: string; }; /** * Disables custom scrollbars and uses native browser ones instead. */ useNativeScrollbars?: boolean; }; export declare function closestElement(selector: string, base: Element): T | null;