import React from "react"; interface IWidgetStyle { backgroundColor: string; roundedCorners: number; text: string; textColor: string; textSize: number; } interface IWidgetConfig { isSingleSurvey?: boolean; } export interface ICornerWidgetStyle extends IWidgetStyle { position: "topleft" | "topright" | "bottomright" | "bottomleft"; size: number; } export declare type INotificationWidgetPosition = "top" | "bottom"; export interface INotificationWidgetStyle extends IWidgetStyle { height: number; position: INotificationWidgetPosition; width: number; } export declare type ISidebarWidgetPosition = "left" | "right"; export interface ISidebarWidgetStyle extends IWidgetStyle { height: number; position: ISidebarWidgetPosition; width: number; } export interface ICpxConfig { accentColor: string; appId: string; bindFetchSurveysAndTransactions?: (fetchSurveysAndTransactions: () => Promise) => void; bindMarkTransactionAsPaid?: (markTransactionAsPaid: (transactionId: string, messageId: string) => Promise) => void; bindOpenWebView?: (openWebView: (surveyId?: string) => void) => void; cornerWidget?: ICornerWidgetStyle & IWidgetConfig; isHidden?: boolean; notificationWidget?: INotificationWidgetStyle & IWidgetConfig; onSurveysUpdate?: (surveys: any[]) => void; onTextsUpdate?: (texts: ITexts) => void; onTransactionsUpdate?: (transactions: any[]) => void; onWebViewWasClosed?: () => void; sidebarWidget?: ISidebarWidgetStyle & IWidgetConfig; userId: string; } export declare type ICpxState = "hidden" | "webView" | "webViewSingleSurvey" | "widgets"; interface IWidgetImages { corner?: string; notification?: string; sidebar?: string; } export interface ITexts { currencyPlural: string; currencySingular: string; shortcutMin: string; } export interface IStore { config: ICpxConfig; cpxState: ICpxState; isNotificationWidgetHidden: boolean; notify(): void; singleSurveyIdForWebView?: any; subscribers: ((store: IStore) => void)[]; surveys: any[]; texts: ITexts; transactions: any[]; widgetImages: IWidgetImages; } export declare const StoreContext: React.Context; export declare const emptyTexts: ITexts; export declare const createStore: (config: ICpxConfig) => IStore; export {};