import { PayloadAction } from "@reduxjs/toolkit";
import type { Collection } from "../../interfaces/models/Collection";
import type { Entity } from "../../interfaces/models/Entity";
import type { ReplykeState } from '../replykeReducers';
export interface CollectionsState {
    collectionsById: {
        [collectionId: string]: Collection;
    };
    subcollectionsMap: {
        [parentId: string]: string[];
    };
    currentCollectionId: string | null;
    collectionHistory: string[];
    loading: boolean;
    currentProjectId?: string;
    entitiesByCollectionId: Record<string, Entity[]>;
}
export declare const collectionsSlice: import("@reduxjs/toolkit").Slice<CollectionsState, {
    setProjectContext: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<string>) => void;
    setLoading: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<boolean>) => void;
    openCollection: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<Collection>) => void;
    goBack: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }) => void;
    goToRoot: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }) => void;
    setCurrentCollection: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<Collection | null>) => void;
    setSubCollections: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collections: Collection[];
        parentCollectionId: string;
    }>) => void;
    updateCurrentCollection: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<Collection>) => void;
    updateCollectionInSubCollections: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<Collection>) => void;
    addNewCollectionAndNavigate: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<Collection>) => void;
    removeCollectionFromSubCollections: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<string>) => void;
    handleCollectionDeletion: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collectionId: string;
        parentId?: string | null;
    }>) => void;
    setCollectionEntities: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collectionId: string;
        entities: Entity[];
    }>) => void;
    appendCollectionEntities: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collectionId: string;
        entities: Entity[];
    }>) => void;
    prependCollectionEntity: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collectionId: string;
        entity: Entity;
    }>) => void;
    removeCollectionEntity: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collectionId: string;
        entityId: string;
    }>) => void;
    insertCollectionEntityAt: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }, action: PayloadAction<{
        collectionId: string;
        entity: Entity;
        index: number;
    }>) => void;
    resetCollections: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }) => void;
    handleError: (state: {
        collectionsById: {
            [x: string]: {
                id: string;
                projectId: string;
                userId: string;
                parentId: string | null;
                name: string;
                entityCount: number;
                createdAt: Date;
                updatedAt: Date;
            };
        };
        subcollectionsMap: {
            [x: string]: string[];
        };
        currentCollectionId: string | null;
        collectionHistory: string[];
        loading: boolean;
        currentProjectId?: string | undefined;
        entitiesByCollectionId: {
            [x: string]: {
                id: string;
                foreignId: string | null;
                shortId: string;
                projectId: string;
                sourceId: string | null;
                spaceId: string | null;
                space?: {
                    id: string;
                    projectId: string;
                    shortId: string;
                    slug: string | null;
                    name: string;
                    description: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    userId: string;
                    readingPermission: import("../..").ReadingPermission;
                    postingPermission: import("../..").PostingPermission;
                    requireJoinApproval: boolean;
                    parentSpaceId: string | null;
                    depth: number;
                    metadata: {
                        [x: string]: any;
                    };
                    createdAt: Date;
                    updatedAt: Date;
                    deletedAt: Date | null;
                    membersCount: number;
                    childSpacesCount: number;
                    isMember?: boolean | undefined;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                } | null | undefined;
                userId: string | null;
                user?: {
                    id: string;
                    projectId: string;
                    foreignId: string | null;
                    role: import("../..").UserRole;
                    name: string | null;
                    username: string | null;
                    avatar: string | null;
                    avatarFileId: string | null;
                    bannerFileId: string | null;
                    avatarFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bannerFile?: {
                        id: string;
                        projectId: string;
                        userId: string | null;
                        entityId: string | null;
                        commentId: string | null;
                        chatMessageId: string | null;
                        spaceId: string | null;
                        type: "image" | "video" | "document" | "other";
                        originalPath: string;
                        originalSize: number;
                        originalMimeType: string;
                        position: number;
                        metadata: {
                            [x: string]: any;
                        };
                        image?: {
                            fileId: string;
                            originalWidth: number;
                            originalHeight: number;
                            variants: {
                                [x: string]: {
                                    path: string;
                                    publicPath: string;
                                    width: number;
                                    height: number;
                                    size: number;
                                    format: string;
                                };
                            };
                            processingStatus: "completed" | "failed";
                            processingError: string | null;
                            format: string;
                            quality: number;
                            exifStripped: boolean;
                            createdAt: Date;
                            updatedAt: Date;
                        } | undefined;
                        createdAt: Date;
                        updatedAt: Date;
                    } | null | undefined;
                    bio: string | null;
                    birthdate: Date | null;
                    location: {
                        type: "Point";
                        coordinates: [number, number];
                    } | null;
                    metadata: {
                        [x: string]: any;
                    };
                    reputation: number;
                    createdAt: Date;
                } | null | undefined;
                title: string | null;
                content: string | null;
                mentions: ({
                    type: "user";
                    id: string;
                    foreignId?: string | null | undefined;
                    username: string;
                } | {
                    type: "space";
                    id: string;
                    slug: string;
                })[];
                attachments: {
                    [x: string]: any;
                }[];
                files?: {
                    id: string;
                    projectId: string;
                    userId: string | null;
                    entityId: string | null;
                    commentId: string | null;
                    chatMessageId: string | null;
                    spaceId: string | null;
                    type: "image" | "video" | "document" | "other";
                    originalPath: string;
                    originalSize: number;
                    originalMimeType: string;
                    position: number;
                    metadata: {
                        [x: string]: any;
                    };
                    image?: {
                        fileId: string;
                        originalWidth: number;
                        originalHeight: number;
                        variants: {
                            [x: string]: {
                                path: string;
                                publicPath: string;
                                width: number;
                                height: number;
                                size: number;
                                format: string;
                            };
                        };
                        processingStatus: "completed" | "failed";
                        processingError: string | null;
                        format: string;
                        quality: number;
                        exifStripped: boolean;
                        createdAt: Date;
                        updatedAt: Date;
                    } | undefined;
                    createdAt: Date;
                    updatedAt: Date;
                }[] | undefined;
                keywords: string[];
                upvotes: string[];
                downvotes: string[];
                reactionCounts: {
                    upvote: number;
                    downvote: number;
                    like: number;
                    love: number;
                    wow: number;
                    sad: number;
                    angry: number;
                    funny: number;
                };
                userReaction?: (import("../..").ReactionType | null) | undefined;
                repliesCount: number;
                views: number;
                score: number;
                scoreUpdatedAt: Date;
                location: {
                    type: "Point";
                    coordinates: [number, number];
                } | null;
                metadata: {
                    [x: string]: any;
                };
                topComment: {
                    id: string;
                    user: {
                        id: string;
                        projectId: string;
                        foreignId: string | null;
                        role: import("../..").UserRole;
                        name: string | null;
                        username: string | null;
                        avatar: string | null;
                        avatarFileId: string | null;
                        bannerFileId: string | null;
                        avatarFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bannerFile?: {
                            id: string;
                            projectId: string;
                            userId: string | null;
                            entityId: string | null;
                            commentId: string | null;
                            chatMessageId: string | null;
                            spaceId: string | null;
                            type: "image" | "video" | "document" | "other";
                            originalPath: string;
                            originalSize: number;
                            originalMimeType: string;
                            position: number;
                            metadata: {
                                [x: string]: any;
                            };
                            image?: {
                                fileId: string;
                                originalWidth: number;
                                originalHeight: number;
                                variants: {
                                    [x: string]: {
                                        path: string;
                                        publicPath: string;
                                        width: number;
                                        height: number;
                                        size: number;
                                        format: string;
                                    };
                                };
                                processingStatus: "completed" | "failed";
                                processingError: string | null;
                                format: string;
                                quality: number;
                                exifStripped: boolean;
                                createdAt: Date;
                                updatedAt: Date;
                            } | undefined;
                            createdAt: Date;
                            updatedAt: Date;
                        } | null | undefined;
                        bio: string | null;
                        birthdate: Date | null;
                        location: {
                            type: "Point";
                            coordinates: [number, number];
                        } | null;
                        metadata: {
                            [x: string]: any;
                        };
                        reputation: number;
                        createdAt: Date;
                    };
                    upvotesCount: number;
                    content: string;
                    createdAt: string;
                } | null;
                isSaved?: boolean | undefined;
                createdAt: Date;
                updatedAt: Date;
                deletedAt: Date | null;
                isDraft: boolean | null;
                moderationStatus: "approved" | "removed" | null;
                moderatedAt: Date | null;
                moderatedById: string | null;
                moderatedByType: "client" | "user" | null;
                moderationReason: string | null;
            }[];
        };
    }) => void;
}, "collections", "collections", import("@reduxjs/toolkit").SliceSelectors<CollectionsState>>;
export declare const setProjectContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "collections/setProjectContext">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "collections/setLoading">, openCollection: import("@reduxjs/toolkit").ActionCreatorWithPayload<Collection, "collections/openCollection">, goBack: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"collections/goBack">, goToRoot: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"collections/goToRoot">, setCurrentCollection: import("@reduxjs/toolkit").ActionCreatorWithPayload<Collection | null, "collections/setCurrentCollection">, setSubCollections: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collections: Collection[];
    parentCollectionId: string;
}, "collections/setSubCollections">, updateCurrentCollection: import("@reduxjs/toolkit").ActionCreatorWithPayload<Collection, "collections/updateCurrentCollection">, updateCollectionInSubCollections: import("@reduxjs/toolkit").ActionCreatorWithPayload<Collection, "collections/updateCollectionInSubCollections">, addNewCollectionAndNavigate: import("@reduxjs/toolkit").ActionCreatorWithPayload<Collection, "collections/addNewCollectionAndNavigate">, removeCollectionFromSubCollections: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "collections/removeCollectionFromSubCollections">, handleCollectionDeletion: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collectionId: string;
    parentId?: string | null;
}, "collections/handleCollectionDeletion">, setCollectionEntities: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collectionId: string;
    entities: Entity[];
}, "collections/setCollectionEntities">, appendCollectionEntities: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collectionId: string;
    entities: Entity[];
}, "collections/appendCollectionEntities">, prependCollectionEntity: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collectionId: string;
    entity: Entity;
}, "collections/prependCollectionEntity">, removeCollectionEntity: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collectionId: string;
    entityId: string;
}, "collections/removeCollectionEntity">, insertCollectionEntityAt: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
    collectionId: string;
    entity: Entity;
    index: number;
}, "collections/insertCollectionEntityAt">, resetCollections: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"collections/resetCollections">, handleError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"collections/handleError">;
declare const _default: import("@reduxjs/toolkit").Reducer<CollectionsState>;
export default _default;
export declare const selectCurrentCollection: (state: {
    replyke: ReplykeState;
}) => Collection | null;
export declare const selectSubCollections: ((state: {
    replyke: ReplykeState;
} & {
    replyke: ReplykeState;
} & {
    replyke: ReplykeState;
}) => Collection[]) & {
    clearCache: () => void;
    resultsCount: () => number;
    resetResultsCount: () => void;
} & {
    resultFunc: (resultFuncArgs_0: string | null, resultFuncArgs_1: {
        [parentId: string]: string[];
    }, resultFuncArgs_2: {
        [collectionId: string]: Collection;
    }) => Collection[];
    memoizedResultFunc: ((resultFuncArgs_0: string | null, resultFuncArgs_1: {
        [parentId: string]: string[];
    }, resultFuncArgs_2: {
        [collectionId: string]: Collection;
    }) => Collection[]) & {
        clearCache: () => void;
        resultsCount: () => number;
        resetResultsCount: () => void;
    };
    lastResult: () => Collection[];
    dependencies: [(state: {
        replyke: ReplykeState;
    }) => string | null, (state: {
        replyke: ReplykeState;
    }) => {
        [parentId: string]: string[];
    }, (state: {
        replyke: ReplykeState;
    }) => {
        [collectionId: string]: Collection;
    }];
    recomputations: () => number;
    resetRecomputations: () => void;
    dependencyRecomputations: () => number;
    resetDependencyRecomputations: () => void;
} & {
    memoize: typeof import("@reduxjs/toolkit").weakMapMemoize;
    argsMemoize: typeof import("@reduxjs/toolkit").weakMapMemoize;
};
export declare const selectCollectionsLoading: (state: {
    replyke: ReplykeState;
}) => boolean;
export declare const selectCollectionHistory: ((state: {
    replyke: ReplykeState;
} & {
    replyke: ReplykeState;
}) => Collection[]) & {
    clearCache: () => void;
    resultsCount: () => number;
    resetResultsCount: () => void;
} & {
    resultFunc: (resultFuncArgs_0: string[], resultFuncArgs_1: {
        [collectionId: string]: Collection;
    }) => Collection[];
    memoizedResultFunc: ((resultFuncArgs_0: string[], resultFuncArgs_1: {
        [collectionId: string]: Collection;
    }) => Collection[]) & {
        clearCache: () => void;
        resultsCount: () => number;
        resetResultsCount: () => void;
    };
    lastResult: () => Collection[];
    dependencies: [(state: {
        replyke: ReplykeState;
    }) => string[], (state: {
        replyke: ReplykeState;
    }) => {
        [collectionId: string]: Collection;
    }];
    recomputations: () => number;
    resetRecomputations: () => void;
    dependencyRecomputations: () => number;
    resetDependencyRecomputations: () => void;
} & {
    memoize: typeof import("@reduxjs/toolkit").weakMapMemoize;
    argsMemoize: typeof import("@reduxjs/toolkit").weakMapMemoize;
};
export declare const selectSubCollectionsMap: (state: {
    replyke: ReplykeState;
}) => {
    [parentId: string]: string[];
};
export declare const selectCollectionsById: (state: {
    replyke: ReplykeState;
}) => {
    [collectionId: string]: Collection;
};
export declare const selectCurrentProjectId: (state: {
    replyke: ReplykeState;
}) => string | undefined;
export declare const selectCurrentCollectionId: (state: {
    replyke: ReplykeState;
}) => string | null;
export declare const selectCollectionEntities: (collectionId: string | null | undefined) => (state: {
    replyke: ReplykeState;
}) => Entity[];
