import { PropsWithChildren } from 'react';
import { CommentData, ThreadData } from '@liveblocks/client';
import { ID } from '@zeniai/client-epic-state';
import { CollaborationEntityType, ThreadMetadata } from './CollaborationTypes';
export declare const NEW_THREAD_SUFFIX = "_new_thread_";
export interface RequestToOpenThreadType {
    companyId: ID;
    entityType: CollaborationEntityType;
    threadId: ID;
    threadMetadata?: ThreadMetadata;
    onThreadShownCallback?: () => void;
}
export declare const ThreadsContext: import('react').Context<ThreadsContextType>;
export declare const NonZeniUsersThreadsContext: import('react').Context<ThreadsContextType>;
export interface ThreadsContextType {
    isLoading: boolean;
    openThread: ID | null;
    requestToOpenThread: RequestToOpenThreadType | null;
    threads: ReadonlyMap<ID, ThreadData<ThreadMetadata>>;
    addThread: (threadId: ID, thread: ThreadData) => void;
    removeComment: (comment: CommentData) => void;
    removeThread: (threadId: ID) => void;
    setOpenThread: (arg: ID | null) => void;
    setRequestToOpenThread: (data: RequestToOpenThreadType | null) => void;
}
/**
 * - `userThreads`: `useUserThreads_experimental` (cross-room user index). Required when there is no `RoomProvider` (e.g. cockpit).
 * - `roomThreads`: `useThreads` for the current room only. Used on the customer dashboard where we connect to `dashboard_${companyId}`.
 */
export type ThreadsIndexStrategy = "userThreads" | "roomThreads";
export declare const ThreadsProvider: ({ children, filter, threadsIndexStrategy, }: PropsWithChildren<{
    filter: Partial<ThreadMetadata>;
    threadsIndexStrategy?: ThreadsIndexStrategy;
}>) => import("react/jsx-runtime").JSX.Element;
/**
 * Hooks
 */
export declare const useActiveThreadsContext: (isZeniUser: boolean) => ThreadsContextType;
export declare const useFilteredThreads: (filter: Partial<ThreadMetadata>, resolved?: boolean | "both", excludeNewThreads?: boolean) => {
    isLoading: boolean;
    threads: ThreadData<ThreadMetadata>[];
};
export declare const getFilteredThreads: (threads: ReadonlyMap<ID, ThreadData<ThreadMetadata>>, filter: Partial<ThreadMetadata>, resolved?: boolean | "both", excludeNewThreads?: boolean) => ReadonlyMap<ID, ThreadData<ThreadMetadata>>;
export declare const sortThreads: (threads: ThreadData[]) => ThreadData[];
