import React from 'react';
import { TipserElementsConfig } from './config';
import { CartItemModel } from './api/cart-types';
import './theme/tipser-elements.less';
export declare type Pushable = {
    push: (to: string) => void;
};
interface TipserElementsProviderProps {
    posId: string;
    config?: TipserElementsConfig;
    history?: Pushable;
}
export declare type TipserScriptApi = {
    updateConfig: (config: Partial<TipserElementsConfig>) => void;
    addToCart: (productId: string) => Promise<void>;
    removeFromCart: (productId: string) => Promise<boolean>;
    getCartItems: () => Promise<CartItemModel[]>;
    addToCartAndGoToCheckout: (productId: string) => Promise<void>;
    openCheckoutDialog: () => void;
    openProductDialog: (productId: string) => void;
    setAnalyticsEnabled: (value: boolean) => void;
    trackProductImpression: (productId: string) => void;
    updatePosData: (productIdToPosData: {
        [productId: string]: string;
    } | string) => void;
};
export declare function usePrevious<T>(value: T): T;
export declare type TipserElementsConfigProp = TipserElementsConfig;
export declare const TipserElementsProvider: React.ForwardRefExoticComponent<TipserElementsProviderProps & {
    children?: React.ReactNode;
} & React.RefAttributes<TipserScriptApi>>;
export {};
//# sourceMappingURL=tipser-elements-provider.d.ts.map