import { type ServerConfig } from '@botonic/core';
import type React from 'react';
import type { BlockInputOption, WebchatSettingsProps } from './components';
import type { CloseWebviewOptions } from './contexts';
import { type ActionRequest, type Event, type EventArgs, type OnStateChangeArgs, type OnUserInputArgs, type PreviewUtils, type WebchatArgs, type WebchatMessage, type WebchatRef } from './index-types';
import type { CoverComponentOptions, PersistentMenuOptionsTheme, WebchatTheme } from './webchat/theme/types';
export declare class WebchatApp {
    theme?: Partial<WebchatTheme>;
    persistentMenu?: PersistentMenuOptionsTheme;
    coverComponent?: CoverComponentOptions;
    blockInputs?: BlockInputOption[];
    enableEmojiPicker?: boolean;
    enableAttachments?: boolean;
    enableUserInput?: boolean;
    enableAnimations?: boolean;
    hostId?: string;
    shadowDOM?: boolean | (() => boolean);
    defaultDelay?: number;
    defaultTyping?: number;
    storage?: Storage | null;
    storageKey: string;
    onInit?: (app: WebchatApp, args: any) => void;
    onOpen?: (app: WebchatApp, args: any) => void;
    onClose?: (app: WebchatApp, args: any) => void;
    onMessage?: (app: WebchatApp, message: WebchatMessage) => void;
    onTrackEvent?: (request: ActionRequest, eventName: string, args?: EventArgs) => Promise<void>;
    onConnectionChange?: (app: WebchatApp, isOnline: boolean) => void;
    appId?: string;
    visibility?: boolean | (() => boolean) | 'dynamic';
    server?: ServerConfig;
    previewUtils?: PreviewUtils;
    webchatRef: React.RefObject<WebchatRef | null>;
    private reactRoot;
    private host;
    private hubtypeService;
    constructor({ theme, persistentMenu, coverComponent, blockInputs, enableEmojiPicker, enableAttachments, enableUserInput, enableAnimations, hostId, shadowDOM, defaultDelay, defaultTyping, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, onConnectionChange, appId, visibility, server, previewUtils, }: WebchatArgs);
    createRootElement(host: HTMLElement | null): void;
    getReactMountNode(node?: (HTMLElement | null) | ShadowRoot): Element | DocumentFragment;
    onInitWebchat(...args: [any]): void;
    onOpenWebchat(...args: [any]): void;
    onCloseWebchat(...args: [any]): void;
    onUserInput({ user, input }: OnUserInputArgs): Promise<void>;
    onTrackEventWebchat(request: ActionRequest, eventName: string, args?: EventArgs): Promise<void>;
    onConnectionRegained(): Promise<void>;
    onStateChange(args: OnStateChangeArgs): void;
    onServiceEvent(event: Event): void;
    updateUser(user: any): void;
    setSystemLocale(locale: string): void;
    setUserLocale(locale: string): void;
    setUserCountry(country: string): void;
    addBotMessage(message: any): void;
    addSystemMessage(message: any): void;
    addBotText(text: string): void;
    addUserMessage(message: any): void;
    addUserText(text: string): void;
    addUserPayload(payload: string): void;
    setTyping(typing: boolean): void;
    open(): void;
    close(): void;
    closeWebview(options?: CloseWebviewOptions): Promise<void>;
    toggle(): void;
    openCoverComponent(): void;
    closeCoverComponent(): void;
    renderCustomComponent(_customComponent: any): void;
    unmountCustomComponent(): void;
    toggleCoverComponent(): void;
    getMessages(): {
        id: string;
        ack: number;
        unsentInput: import("@botonic/core").Input;
    }[] | undefined;
    clearMessages(): void;
    getVisibility(): Promise<boolean>;
    getLastMessageUpdate(): string | undefined;
    updateMessageInfo(msgId: string, messageInfo: any): void | undefined;
    updateWebchatSettings(settings: WebchatSettingsProps): void | undefined;
    createInitialTheme(optionsAtRuntime?: WebchatArgs): WebchatTheme & Partial<WebchatTheme>;
    createInitialThemeUserInput(theme: WebchatTheme, optionsAtRuntime?: WebchatArgs): {
        attachments?: {
            enable?: boolean;
            custom?: React.ComponentType;
        };
        blockInputs?: BlockInputOption[];
        box?: {
            placeholder: string;
            style?: any;
        };
        emojiPicker?: {
            enable?: boolean;
            custom?: React.ComponentType;
        };
        menu?: {
            darkBackground?: boolean;
            custom?: React.ComponentType<import("./webchat/theme/types").PersistentMenuOptionsProps>;
        };
        menuButton?: {
            custom?: React.ComponentType;
        };
        persistentMenu?: PersistentMenuOptionsTheme;
        sendButton?: {
            enable?: boolean;
            custom?: React.ComponentType;
        };
        enable?: boolean;
        style?: any;
    };
    getComponent(host: HTMLDivElement, optionsAtRuntime?: WebchatArgs): import("react/jsx-runtime").JSX.Element;
    isWebchatVisible(appId: string): Promise<boolean>;
    isOnline(): boolean | undefined;
    resolveWebchatVisibility(optionsAtRuntime?: WebchatArgs): Promise<boolean>;
    destroy(): void;
    render(dest: HTMLDivElement, optionsAtRuntime?: WebchatArgs): Promise<void>;
}
