import React from 'react';
import { identity } from 'ramda';
import { useUsers } from '../../hooks/useUsers';
import { UsersContext } from '../UsersContext';
export var InitialCollaborationContextValue = {
    comments: [],
    commentsMap: null,
    currentComment: null,
    updateCommentState: identity,
    clearCommentState: identity,
    getCommentState: function () { return ({}); },
    getComment: identity,
    getComments: function () { return new Promise(identity); },
    getCommentsCount: identity,
    createComment: function () { return new Promise(identity); },
    editComment: function () { return new Promise(identity); },
    createReply: function () { return new Promise(identity); },
    resolveThread: identity,
    reOpenThread: identity,
    clearCurrentComment: identity,
    deleteComment: identity,
    sending: false,
    loading: false,
    pageToken: null,
    deleteReply: identity,
    editReply: function () { return new Promise(identity); },
    totalCommentsCount: null
};
export var CollaborationContext = React.createContext(InitialCollaborationContextValue);
CollaborationContext.displayName = 'CollaborationContext';
export var CollaborationContextProvider = function (_a) {
    var collaboration = _a.collaboration, children = _a.children;
    var users = useUsers();
    return (React.createElement(CollaborationContext.Provider, { value: collaboration },
        React.createElement(UsersContext.Provider, { value: users }, children)));
};
