import { App } from 'vue';
import { BaseMessage } from '@cometchat/chat-sdk-javascript';
import { Call } from '@cometchat/chat-sdk-javascript';
import { CometChat as CometChat_2 } from '@cometchat/chat-sdk-javascript';
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { ComputedRef } from 'vue';
import { Conversation } from '@cometchat/chat-sdk-javascript';
import { DefineComponent } from 'vue';
import { Group } from '@cometchat/chat-sdk-javascript';
import { MessageReceipt } from '@cometchat/chat-sdk-javascript';
import { PublicProps } from 'vue';
import { Ref } from 'vue';
import { User } from '@cometchat/chat-sdk-javascript';
import { WritableComputedRef } from 'vue';

declare const __VLS_base: DefineComponent<__VLS_Props, {
    applyComposerFormat: typeof applyComposerFormat;
    applyComposerLink: typeof applyComposerLink;
    cancelComposerLink: typeof cancelComposerLink;
    getComposerSelection: typeof getComposerSelection;
    requestComposerLink: typeof requestComposerLink;
    scrollToMessage: typeof scrollToMessage_2;
    groupMembers: ComputedRef<{
        uid: string;
        displayName: string;
        avatar: string;
        role: string;
    }[]>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
    chatNotAMember: (chatUid: string) => any;
    composerSelectionChange: (selection: ChatComposerSelectionState | null) => any;
    composerLinkRequest: (selection: ChatComposerSelectionState) => any;
    chatMembersFetched: (members: ParticipantInfo[]) => any;
    chatEmpty: () => any;
    linkClicked: (event: MouseEvent, url: string) => any;
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
    onChatNotAMember?: ((chatUid: string) => any) | undefined;
    onComposerSelectionChange?: ((selection: ChatComposerSelectionState | null) => any) | undefined;
    onComposerLinkRequest?: ((selection: ChatComposerSelectionState) => any) | undefined;
    onChatMembersFetched?: ((members: ParticipantInfo[]) => any) | undefined;
    onChatEmpty?: (() => any) | undefined;
    onLinkClicked?: ((event: MouseEvent, url: string) => any) | undefined;
}>, {
    chatUid: string;
    hideGroupActions: boolean;
    client: ChatClient | null;
    isReadOnly: boolean;
    initialScheduledMessagesOpen: boolean;
    hideDeletedMessages: boolean;
    displayNoMessagesText: boolean;
    showMessageHeader: boolean;
    composerFormattingMode: ComposerFormattingMode;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;

declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;

declare type __VLS_Props = {
    client?: ChatClient | null;
    conversation?: ChatConversationItem | null;
    messages?: ChatMessageItem[];
    threadMessages?: ChatMessageItem[];
    loadingMessages?: boolean;
    loadingThreadMessages?: boolean;
    isReadOnly?: boolean;
    sendOptions?: MessageSendOptions;
    showDefaultEmptyState?: boolean;
    initialScheduledMessagesOpen?: boolean;
    chatUid?: string;
    senderDisplayName?: string;
    hideDeletedMessages?: boolean;
    hideGroupActions?: boolean;
    chatMessageGetter?: ChatMessagesGetter;
    displayNoMessagesText?: boolean;
    language?: Language;
    showHeader?: boolean;
    showMessageHeader?: boolean;
    containerClass?: string;
    actionMessageClass?: string;
    actionMessageRowClass?: string;
    composerFormattingMode?: ComposerFormattingMode;
};

declare type __VLS_Slots = {} & {
    'error-message'?: (props: typeof __VLS_1) => any;
} & {
    'message-header'?: (props: typeof __VLS_18) => any;
} & {
    'no-messages'?: (props: typeof __VLS_80) => any;
} & {
    'not-a-member'?: (props: typeof __VLS_83) => any;
};

declare type __VLS_WithSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};

declare function applyComposerFormat(command: ComposerFormatCommand, target?: ChatComposerTarget): boolean;

declare function applyComposerLink(url: string, target?: ChatComposerTarget): boolean;

export declare interface AttachmentUploadInput {
    file: File;
    caption?: string;
}

export declare interface BccChatComposerFormattingHandle {
    applyComposerFormat(command: ComposerFormatCommand, target?: ChatComposerTarget): boolean;
    requestComposerLink(target?: ChatComposerTarget): boolean;
    applyComposerLink(url: string, target?: ChatComposerTarget): boolean;
    cancelComposerLink(target?: ChatComposerTarget): void;
    getComposerSelection(target?: ChatComposerTarget): ChatComposerSelectionState | null;
}

export declare interface BccChatExpose extends BccChatComposerFormattingHandle {
    scrollToMessage(messageId: string): Promise<void>;
    readonly groupMembers: ParticipantInfo[];
}

export declare interface CachedLastMessage {
    chatUid: string;
    lastMessage: null | MessageInfo;
    lastUpdated: number;
}

export declare interface CachedParticipantSettings {
    chatUid: string;
    mutedUntil: string | null;
    lastUpdated: number;
}

declare function cancelComposerLink(target?: ChatComposerTarget): void;

declare const chat: {
    install: typeof install;
    setGetChatMessagesCallback: typeof setGetChatMessagesCallback;
    initialized: Ref<boolean, boolean>;
    connected: ComputedRef<boolean>;
    connecting: ComputedRef<boolean>;
    loggedIn: ComputedRef<boolean>;
    userChats: Ref<{
        chatUid: string;
        name: string;
        unreadMessageCount: number;
        lastMessage?: {
            text?: string | undefined;
            type: string;
            senderUid: string;
            senderName: string;
            sentAt: Date;
            sentByCurrentUser: boolean;
            readAt: Date | undefined;
            messageReceipts?: {
                RECEIPT_TYPE: {
                    READ_RECEIPT: string;
                    DELIVERY_RECEIPT: string;
                    READ_BY_ALL_RECEIPT: string;
                    DELIVERED_TO_ALL_RECEIPT: string;
                };
                getReceiverType: () => string;
                setReceiverType: (receiverType: string) => void;
                getSender: () => User;
                setSender: (sender: User) => void;
                getReceiver: () => string;
                setReceiver: (receiver: string) => void;
                getTimestamp: () => string;
                setTimestamp: (timestamp: string) => void;
                setReadAt: (readAt: number) => void;
                getReadAt: () => number;
                setDeliveredAt: (deliveredAt: number) => void;
                getDeliveredAt: () => number;
                getMessageId: () => string;
                setMessageId: (messageId: string) => void;
                getReceiptType: () => string;
                setReceiptType: (receiptType?: string) => void;
            }[] | undefined;
        } | undefined;
        membersCount: number;
        tags: string[];
        muteSettings?: (Date | null) | undefined;
        hasJoined: boolean;
    }[], UserChatInfo[] | {
        chatUid: string;
        name: string;
        unreadMessageCount: number;
        lastMessage?: {
            text?: string | undefined;
            type: string;
            senderUid: string;
            senderName: string;
            sentAt: Date;
            sentByCurrentUser: boolean;
            readAt: Date | undefined;
            messageReceipts?: {
                RECEIPT_TYPE: {
                    READ_RECEIPT: string;
                    DELIVERY_RECEIPT: string;
                    READ_BY_ALL_RECEIPT: string;
                    DELIVERED_TO_ALL_RECEIPT: string;
                };
                getReceiverType: () => string;
                setReceiverType: (receiverType: string) => void;
                getSender: () => User;
                setSender: (sender: User) => void;
                getReceiver: () => string;
                setReceiver: (receiver: string) => void;
                getTimestamp: () => string;
                setTimestamp: (timestamp: string) => void;
                setReadAt: (readAt: number) => void;
                getReadAt: () => number;
                setDeliveredAt: (deliveredAt: number) => void;
                getDeliveredAt: () => number;
                getMessageId: () => string;
                setMessageId: (messageId: string) => void;
                getReceiptType: () => string;
                setReceiptType: (receiptType?: string) => void;
            }[] | undefined;
        } | undefined;
        membersCount: number;
        tags: string[];
        muteSettings?: (Date | null) | undefined;
        hasJoined: boolean;
    }[]>;
    userUid: ComputedRef<string | undefined>;
    connect: typeof connect;
    disconnect: typeof disconnect;
    disconnectAll: typeof disconnectAll;
    setAccessToken: typeof setAccessToken;
    login: typeof login;
    logout: typeof logout;
    setCurrentEnvironment: typeof setEnvironment;
    getCurrentEnvironment: typeof getCurrentEnvironment;
    setThemeMode: typeof setThemeMode;
    setLanguage: typeof setLanguage;
    getGroup: typeof getGroup;
    getChatMembersInfo: typeof getChatMembersInfo;
    getUserChats: typeof getUserChats;
    clearChatCount: typeof clearChatCount;
    refreshVisibleMessages: () => Promise<void> | undefined;
    getChatOnlineCount: typeof getChatOnlineCount;
    searchChat: (searchQuery: string, limit?: number) => SearchedItems | undefined;
    getSenderDisplayName: typeof getSenderDisplayName;
    getMessageTextPreview: typeof getMessageTextPreview;
    proxyImage: typeof proxyImage;
    getMutedUntil: typeof getMutedUntil;
    muteChat: typeof muteChat;
    getMyChatSettings: typeof getMyChatSettings;
    updateMyChatSettings: typeof updateMyChatSettings;
    setMuteAll: typeof setMuteAll;
    toggleMuteAll: typeof toggleMuteAll;
    toMarkdownHtml: typeof toMarkdownHtml;
    retrieveCcToken: typeof retrieveCcToken;
    getChatMessages: Ref<ChatMessagesGetter | undefined, ChatMessagesGetter | undefined>;
    scrollToMessageId: Ref<string | undefined, string | undefined>;
    scrollToMessage: typeof scrollToMessage;
    connectivity: {
        onlineMode: WritableComputedRef<OnlineStatus, OnlineStatus>;
        onlineStatus: ComputedRef<OnlineStatus>;
    };
    onlineMode: WritableComputedRef<OnlineStatus, OnlineStatus>;
    onlineStatus: ComputedRef<OnlineStatus>;
    theme: Ref<{
        palette: {
            mode: ThemeMode;
            setMode: (mode: ThemeMode) => void;
        };
    }, {
        palette: {
            mode: ThemeMode;
            setMode(mode: ThemeMode): void;
        };
    } | {
        palette: {
            mode: ThemeMode;
            setMode: (mode: ThemeMode) => void;
        };
    }>;
    themeMode: Ref<ThemeMode, ThemeMode>;
    language: Ref<Language, Language>;
    calls: {
        state: ComputedRef<"idle" | "outgoing" | "incoming" | "connecting" | "in-call">;
        activeType: ComputedRef<"video" | "audio">;
        activeSessionId: ComputedRef<string | null>;
        incomingCall: ComputedRef< Call | null>;
        incomingCalls: ComputedRef<Map<string, Call>>;
        outgoingCall: ComputedRef< Call | null>;
        start: (receiverId: string, container: HTMLElement, callType?: "audio" | "video", receiverType?: "user" | "group") => Promise< Call>;
        accept: (container: HTMLElement, sessionId?: string) => Promise<void>;
        reject: (sessionId?: string) => Promise<void>;
        end: () => Promise<void>;
        joinActive: (container: HTMLElement) => Promise<void>;
    };
};
export { chat }
export default chat;

export declare interface ChatAttachmentItem {
    kind: Extract<ChatMessageKind, "image" | "video" | "audio" | "file">;
    name: string;
    url?: string;
    mimeType?: string;
    extension?: string;
    size?: number;
    width?: number;
    height?: number;
}

export declare interface ChatClient {
    initialized: Ref<boolean>;
    loggingIn: Ref<boolean>;
    loadingConversations: Ref<boolean>;
    loadingMessages: Ref<boolean>;
    loadingThreadMessages: Ref<boolean>;
    loadingOlderMessages: Ref<boolean>;
    loadingOlderThreadMessages: Ref<boolean>;
    loadingScheduledMessages: Ref<boolean>;
    sendingMessage: Ref<boolean>;
    schedulingMessage: Ref<boolean>;
    syncingQueue: Ref<boolean>;
    connected: Ref<boolean>;
    offlineMode: Ref<boolean>;
    hideGroupActions: Ref<boolean>;
    loggedIn: Ref<boolean>;
    error: Ref<string | null>;
    currentUser: Ref<ChatUserProfile | null>;
    conversations: Ref<ChatConversationItem[]>;
    messages: Ref<ChatMessageItem[]>;
    threadMessages: Ref<ChatMessageItem[]>;
    scheduledMessages: Ref<ChatMessageItem[]>;
    hasOlderMessages: Ref<boolean>;
    hasOlderThreadMessages: Ref<boolean>;
    pendingQueueCount: ComputedRef<number>;
    activeConversationId: Ref<string | null>;
    activeConversation: ComputedRef<ChatConversationItem | null>;
    activeThreadParentMessage: Ref<ChatMessageItem | null>;
    replyToMessage: Ref<ChatMessageItem | null>;
    editingMessage: Ref<ChatMessageItem | null>;
    init: () => Promise<void>;
    connectRealtime: () => Promise<void>;
    disconnectRealtime: () => Promise<void>;
    login: (accessToken: string) => Promise<void>;
    logout: () => Promise<void>;
    fetchConversations: () => Promise<void>;
    selectConversation: (conversationId: string | null) => Promise<void>;
    sendTextMessage: (text: string, options?: MessageSendOptions) => Promise<void>;
    sendAttachmentMessage: (input: AttachmentUploadInput, options?: MessageSendOptions) => Promise<void>;
    sendPollMessage: (input: PollComposerInput, options?: MessageSendOptions) => Promise<void>;
    fetchScheduledMessages: (originalChatUid?: string) => Promise<void>;
    loadOlderMessages: () => Promise<boolean>;
    loadOlderThreadMessages: () => Promise<boolean>;
    ensureMessageLoaded: (messageId: string) => Promise<boolean>;
    scheduleMessage: (input: ScheduleMessageInput, options?: MessageSendOptions) => Promise<void>;
    rescheduleMessage: (input: RescheduleMessageInput) => Promise<void>;
    removeScheduledMessage: (message: ChatMessageItem) => Promise<void>;
    editScheduledMessage: (message: ChatMessageItem, nextText: string) => Promise<void>;
    setReplyToMessage: (message: ChatMessageItem | null) => void;
    setEditingMessage: (message: ChatMessageItem | null) => void;
    openThread: (message: ChatMessageItem) => Promise<void>;
    closeThread: () => void;
    refreshVisibleMessages: (options?: {
        includeThread?: boolean;
    }) => Promise<void>;
    fetchMessageReceipts: (message: ChatMessageItem) => Promise<ChatMessageReceiptItem[]>;
    fetchMessageReactions: (message: ChatMessageItem) => Promise<ChatReactionDetailItem[]>;
    deleteMessage: (message: ChatMessageItem) => Promise<void>;
    votePoll: (message: ChatMessageItem, optionId: string) => Promise<void>;
    toggleReaction: (message: ChatMessageItem, emoji: string) => Promise<void>;
    translateMessage: (message: ChatMessageItem) => Promise<void>;
    mentionDisplayNamesByUid: Ref<Record<string, string>>;
    rememberMentionDisplayNames: (entries: ReadonlyArray<{
        uid: string;
        displayName: string;
    }>) => void;
    initiateCall: (receiverId: string, container: HTMLElement, callType?: "video" | "audio", receiverType?: "user" | "group") => Promise<InstanceType<typeof CometChat_2.Call>>;
    acceptIncomingCall: (container: HTMLElement, sessionId?: string) => Promise<void>;
    rejectIncomingCall: (sessionId?: string) => Promise<void>;
    endActiveCall: () => Promise<void>;
    joinOutgoingCallSession: (container: HTMLElement) => Promise<void>;
    incomingCall: Ref<InstanceType<typeof CometChat_2.Call> | null>;
    incomingCalls: Ref<Map<string, InstanceType<typeof CometChat_2.Call>>>;
    outgoingCall: Ref<InstanceType<typeof CometChat_2.Call> | null>;
    activeCallSessionId: Ref<string | null>;
    activeCallType: Ref<"audio" | "video">;
    callState: Ref<"idle" | "outgoing" | "incoming" | "connecting" | "in-call">;
}

export declare interface ChatComposerSelectionState extends ComposerSelectionState {
    target: ChatComposerTarget;
}

export declare type ChatComposerTarget = "main" | "thread";

export declare interface ChatConversationItem {
    id: string;
    targetId: string;
    type: "group" | "user";
    title: string;
    subtitle: string;
    avatar?: string;
    unreadCount: number;
    lastMessageAt?: Date;
    muteSettings?: Date | null;
    hasJoined?: boolean;
    tags: string[];
    memberCount?: number;
    source?: Conversation | null;
    lastMessage?: ChatMessageItem | null;
}

export declare type ChatDeliveryState = "sent" | "queued" | "sending" | "failed";

declare interface ChatEnvironmentConfig {
    region: string;
    appId: string;
    chatApiBaseUrl: string;
}

export declare interface ChatInstallOptions {
    environment: Environment;
    language?: Language;
    themeMode: ThemeMode;
    accessToken?: Ref<string | null | undefined> | null | undefined | string;
    loggerCallback?: (entry: LogEntry) => void;
}

export declare interface ChatInstance {
    componentId: string;
    replyToMessage: BaseMessage | null;
    captionedAttachment: {
        fileObject?: File;
        dimensions?: {
            width: number;
            height: number;
        };
    } | null;
    decoyAttachment: {
        fileObject?: File;
        dimensions?: {
            width: number;
            height: number;
        };
    } | null;
    scheduledMessageChat?: Group;
    showScheduledMessagesChat: boolean;
    showAlert: boolean;
    showRescheduleAlert: boolean;
    userInput: string | null;
    rescheduleInfo: {
        rescheduleMuid: string;
        messageId: number;
    } | null;
}

export declare interface ChatMessageItem {
    id: string;
    muid?: string;
    conversationId: string;
    senderId: string;
    senderName: string;
    text: string;
    kind: ChatMessageKind;
    sentAt: Date;
    category: string;
    type: string;
    senderAvatar?: string;
    isOwn: boolean;
    isDeleted: boolean;
    isEdited: boolean;
    attachments: ChatAttachmentItem[];
    poll?: ChatPollData;
    scheduled?: ChatScheduledInfo;
    translatedText?: string;
    replyTo?: ChatReplyPreview;
    parentMessageId?: string;
    replyCount: number;
    reactions: ChatReactionItem[];
    receipts: ChatMessageReceiptSummary;
    deliveryState: ChatDeliveryState;
    metadata?: Record<string, unknown>;
    source: any;
}

export declare type ChatMessageKind = "text" | "image" | "video" | "audio" | "file" | "poll" | "action" | "unsupported";

export declare interface ChatMessageReceiptItem {
    kind: ChatMessageReceiptKind;
    user: ChatUserProfile;
    timestamp?: Date;
}

export declare type ChatMessageReceiptKind = "delivered" | "read";

export declare interface ChatMessageReceiptSummary {
    deliveredAt?: Date;
    deliveredToMeAt?: Date;
    readAt?: Date;
    readByMeAt?: Date;
}

export declare type ChatMessagesGetter = (guid: string, query: string) => Promise<ChatMessagesGetterResult>;

export declare interface ChatMessagesGetterPagination {
    total_pages?: number;
    current_page?: number;
    [key: string]: unknown;
}

export declare interface ChatMessagesGetterResult<TMessage = Record<string, unknown>> {
    data: TMessage[];
    meta?: {
        pagination?: ChatMessagesGetterPagination;
        [key: string]: unknown;
    };
    [key: string]: unknown;
}

export declare interface ChatPollData {
    id?: string;
    question: string;
    options: ChatPollOptionItem[];
    totalVotes: number;
    allowsMultipleAnswers: boolean;
}

export declare interface ChatPollOptionItem {
    id: string;
    text: string;
    voteCount: number;
    voters: ChatUserProfile[];
}

export declare interface ChatReactionDetailItem {
    emoji: string;
    user: ChatUserProfile;
    reactedAt?: Date;
}

export declare interface ChatReactionItem {
    emoji: string;
    count: number;
    reactedByMe: boolean;
}

export declare interface ChatReplyPreview {
    messageId: string;
    senderName: string;
    text: string;
    kind: ChatMessageKind;
}

export declare interface ChatScheduledInfo {
    scheduleDate?: Date;
    originalChatUid?: string;
    muid?: string;
    messageId?: number;
}

export declare interface ChatUserProfile {
    uid: string;
    name: string;
    avatar?: string;
    status?: string;
}

declare function clearChatCount(chatUid: string): Promise<void>;

export declare type ComposerFormatCommand = "bold" | "italic" | "underline";

export declare type ComposerFormattingMode = "default" | "external";

export declare interface ComposerSelectionRect {
    x: number;
    y: number;
    top: number;
    right: number;
    bottom: number;
    left: number;
    width: number;
    height: number;
}

export declare interface ComposerSelectionState {
    text: string;
    href?: string;
    rect: ComposerSelectionRect;
}

declare function connect(connectionName?: string): Promise<void>;

export declare function createChatClient({ environment }: CreateChatClientOptions): ChatClient;

declare interface CreateChatClientOptions {
    environment: Environment;
}

declare const _default: typeof __VLS_export;
export { _default as BccChat }
export { _default as BccChatMessageList }

declare function disconnect(connectionName?: string): Promise<void>;

declare function disconnectAll(): Promise<void>;

export declare interface DispatchData {
    muid: string;
    originalChatUid: string;
    scheduleDate: string;
    messageId: number;
}

export declare type Environment = "prod" | "sandbox";

export declare interface FuseResultMatch {
    indices: ReadonlyArray<[number, number]>;
    key?: {
        src: string;
    } | string;
    value?: string;
}

declare function getChatMembersInfo(chatUid: string): Promise<ParticipantInfo[]>;

declare function getChatOnlineCount(chatUid: string): Promise<number>;

declare function getComposerSelection(target?: ChatComposerTarget): ChatComposerSelectionState | null;

declare function getCurrentEnvironment(): ChatEnvironmentConfig;

declare function getGroup(groupUid: string, throwErrors?: boolean): Promise<Group | null | undefined>;

declare function getMessageTextPreview(message?: any, showEmoji?: boolean, showAttachmentName?: boolean): string;

declare function getMutedUntil(chatUid: string): Promise<string | null>;

declare function getMyChatSettings(): Promise<PersonSettings>;

declare function getSenderDisplayName(message: any, group?: Ref<{
    getMetadata?: () => Record<string, any>;
} | undefined>): any;

declare function getUserChats(): Promise<{
    chatUid: string;
    name: string;
    unreadMessageCount: number;
    lastMessage?: {
        text?: string | undefined;
        type: string;
        senderUid: string;
        senderName: string;
        sentAt: Date;
        sentByCurrentUser: boolean;
        readAt: Date | undefined;
        messageReceipts?: {
            RECEIPT_TYPE: {
                READ_RECEIPT: string;
                DELIVERY_RECEIPT: string;
                READ_BY_ALL_RECEIPT: string;
                DELIVERED_TO_ALL_RECEIPT: string;
            };
            getReceiverType: () => string;
            setReceiverType: (receiverType: string) => void;
            getSender: () => User;
            setSender: (sender: User) => void;
            getReceiver: () => string;
            setReceiver: (receiver: string) => void;
            getTimestamp: () => string;
            setTimestamp: (timestamp: string) => void;
            setReadAt: (readAt: number) => void;
            getReadAt: () => number;
            setDeliveredAt: (deliveredAt: number) => void;
            getDeliveredAt: () => number;
            getMessageId: () => string;
            setMessageId: (messageId: string) => void;
            getReceiptType: () => string;
            setReceiptType: (receiptType?: string) => void;
        }[] | undefined;
    } | undefined;
    membersCount: number;
    tags: string[];
    muteSettings?: (Date | null) | undefined;
    hasJoined: boolean;
}[]>;

declare function install(app: App, options: ChatInstallOptions): Promise<void>;

export declare type Language = "nb" | "no" | "ar" | "de" | "en" | "es" | "fr" | "hi" | "ms" | "pt" | "ru" | "zh" | "zh-tw" | "sv" | "lt";

export declare interface LogEntry {
    logUid: string;
    correlationUid?: string;
    message: string;
    severity: LogSeverity;
    userMetadata?: Record<string, unknown>;
    timestamp: string;
}

declare function login(accessToken?: string): Promise<void>;

declare function logout(): Promise<void>;

export declare enum LogSeverity {
    DEBUG = "Debug",
    INFO = "Info",
    WARN = "Warn",
    ERROR = "Error"
}

export declare interface MessageInfo {
    text?: string;
    type: string;
    senderUid: string;
    senderName: string;
    sentAt: Date;
    sentByCurrentUser: boolean;
    readAt: Date | undefined;
    messageReceipts?: MessageReceipt[];
}

export declare interface MessageSendOptions {
    senderDisplayName?: string;
}

declare function muteChat(chatUid: string, mutedUntil: string | null): Promise<string | null>;

export declare type OnlineStatus = "online" | "offline";

export declare interface ParticipantInfo {
    uid: string;
    displayName: string;
    avatar: string;
    role: string;
}

export declare interface ParticipantSettings {
    chatUid: string;
    personUid: string;
    mutedUntil: string | null;
}

export declare interface PersonSettings {
    mutedAll: boolean;
}

export declare interface PollComposerInput {
    question: string;
    options: string[];
}

declare function proxyImage(imageUrl: string): string;

declare function requestComposerLink(target?: ChatComposerTarget): boolean;

export declare interface RescheduleMessageInput {
    messageId: number;
    muid: string;
    originalChatUid: string;
    scheduleDate: string;
}

declare function retrieveCcToken(): StoredCometChatToken | null;

export declare interface ScheduleMessageInput {
    scheduleDate: string;
    text?: string;
    file?: File;
    caption?: string;
}

declare function scrollToMessage(messageId: string): void;

declare function scrollToMessage_2(messageId: string): Promise<void>;

export declare interface SearchedItems {
    conversations: {
        conversation: ChatConversationItem;
        matches: FuseResultMatch[];
    }[];
    messages: {
        message: ChatMessageItem;
        matches: FuseResultMatch[];
    }[];
}

declare function setAccessToken(token: string): Promise<void>;

declare function setEnvironment(environment: Environment): void;

declare function setGetChatMessagesCallback(chatMessageGetter: ChatMessagesGetter | undefined): void;

declare function setLanguage(language: Language): void;

declare function setMuteAll(mute: boolean): Promise<boolean>;

declare function setThemeMode(mode: ThemeMode): void;

declare interface StoredCometChatToken {
    sub: string;
    token: string;
}

export declare type ThemeMode = "dark" | "light";

declare function toggleMuteAll(): Promise<boolean>;

declare function toMarkdownHtml(str: string, mentionedUsers?: any[]): string;

declare function updateMyChatSettings(settings: Partial<PersonSettings>): Promise<PersonSettings>;

export declare interface UserChatInfo {
    chatUid: string;
    name: string;
    unreadMessageCount: number;
    lastMessage?: MessageInfo;
    membersCount: number;
    tags: string[];
    muteSettings?: Date | null;
    hasJoined: boolean;
}

export declare interface View {
    componentName: string;
    props?: Record<string, unknown>;
}

export { }
