import { ErrorState } from '../common/errorStates'; import { AgentActivityState, StreamState } from '../components/types/types'; import { Agent, AgentManager, ChatMode, ChatResponse, ConnectionState, Message, StreamType } from '@d-id/client-sdk'; import { JSX } from 'preact'; interface IAgentManagerContext { connectionState: ConnectionState; connect: () => Promise; disconnect: () => Promise; reconnect: () => Promise; restart: () => Promise; streamState: StreamState; streamedMessage: string; srcObject?: MediaStream; setStreamState: (state: StreamState) => void; streamType?: StreamType; error: string; errorState: ErrorState; setError: (error: string) => void; setErrorState: (error: ErrorState) => void; agent?: Agent; agentActivityState: AgentActivityState; setAgentActivityState: (state: AgentActivityState) => void; starterMessages: AgentManager['starterMessages']; chatId?: string; messages: Message[]; terminating: boolean; language: string; setLanguage: (lang: string) => void; enabled: boolean; greeted: boolean; changeMode: (mode: ChatMode) => void; getSTTToken: AgentManager['getSTTToken']; rate: AgentManager['rate']; sendChatMessage: (userMessage: string) => Promise; enrichSdkAnalytics: AgentManager['enrichAnalytics']; interrupt: AgentManager['interrupt']; interruptAvailable: boolean; interruptLoading: boolean; triggersAvailable: boolean; fluentStarted: boolean; legacyStarted: boolean; } export declare const useAgentManager: () => IAgentManagerContext; interface Props { children: JSX.Element; enabled: boolean; onAgentReady?: (agent: Agent) => void; agentId: string; onError?: (error: Error, errorData: any) => void; } export declare function AgentManagerProvider({ agentId, children, enabled, onAgentReady, onError }: Props): JSX.Element; export {};