import React from 'react';
import { SetState } from '../types.mjs';
import { Audio, AVPlaybackStatus } from 'expo-av';
import { Emoticon, Message, Media, UserMeta, ConversationListItem } from 'softchatjs-core';
import 'react-native';

declare const initialMessageStateContext: MessageStateContext;

type MessageStateContext = {
    globalTextMessage: string;
    setGlobalTextMessage: SetState<string>;
    stickers: Emoticon[];
    setStickers: SetState<Emoticon[]>;
    pendingMessages: Array<Partial<Message>>;
    addNewPendingMessages: (message: Partial<Message>) => void;
    removePendingMessage: (messageId: string) => void;
    updatePendingMessage: (messageId: string, message: Message) => void;
    playVoiceMessage: (media: Media) => void;
    pauseVoiceMessage: () => void;
    resumeVoiceMessage: () => void;
    audioState: "playing" | "paused" | "loading" | null;
    unload: () => void;
    sound: Audio.Sound | null;
    activeVoiceMessage: Media | null;
    avPlayBackStatus: AVPlaybackStatus & {
        positionMillis: number;
    } | null;
    userMeta: UserMeta;
    setUserMeta: SetState<UserMeta>;
    conversationList: Array<ConversationListItem>;
    setConversationList: SetState<Array<ConversationListItem>>;
};
declare const MessageStateContext: React.Context<MessageStateContext>;
declare const useMessageState: () => MessageStateContext;
declare const MessageStateProvider: ({ children }: {
    children: JSX.Element;
}) => React.JSX.Element;

export { MessageStateProvider, initialMessageStateContext as default, useMessageState };
