import type { KuboRpcClient, NativeFunctions } from "../../types.js";
import { PKC } from "../../pkc/pkc.js";
import { RemoteCommunity } from "../../community/remote-community.js";
import Logger from "../../logger.js";
import type { CommunityIpfsType } from "../../community/types.js";
import type { CommentIpfsType, CommentsTableRow, CommentUpdateType, DbRepliesFormat, DbPostsFormat } from "../../publications/comment/types.js";
import { DbHandler } from "./community/db-handler.js";
export declare const getDefaultDataPath: () => string;
export declare const getDefaultCommunityDbConfig: (communityAddress: string, pkc: PKC) => Promise<DbHandler["_dbConfig"]>;
export declare function getThumbnailPropsOfLink(url: string, community: RemoteCommunity, proxyHttpUrl?: string): Promise<{
    thumbnailUrl: string;
    thumbnailUrlWidth?: number;
    thumbnailUrlHeight?: number;
} | undefined>;
export declare const nativeFunctions: NativeFunctions;
export declare const setNativeFunctions: (newNativeFunctions: Partial<NativeFunctions>) => void;
export declare const deleteOldCommunityInWindows: (subPath: string, pkc: Pick<PKC, "_storage">) => Promise<void>;
export declare function tryToDeleteCommunitiesThatFailedToBeDeletedBefore(pkc: PKC, log: Logger): Promise<string[] | undefined>;
export declare function listCommunitiesSync(pkc: PKC): string[];
export declare function importSignerIntoKuboNode(ipnsKeyName: string, ipfsKey: Uint8Array, kuboRpcClientOptions: KuboRpcClient["_clientOptions"]): Promise<{
    id: string;
    name: string;
} | undefined>;
export type BackupCommunityDbOptions = {
    sourcePath: string;
    destPath: string;
    includePrivateKey: boolean;
    onProgress?: (progress: number) => void;
    signal?: AbortSignal;
};
export declare class BackupAbortError extends Error {
    readonly name = "BackupAbortError";
    constructor();
}
export declare function backupCommunityDb(opts: BackupCommunityDbOptions): Promise<{
    size: number;
    sha256: string;
}>;
export declare function moveCommunityDbToDeletedDirectory(communityAddress: string, pkc: PKC): Promise<void>;
export declare function createKuboRpcClient(kuboRpcClientOptions: KuboRpcClient["_clientOptions"]): KuboRpcClient["_client"];
export declare function monitorCommunitiesDirectory(pkc: PKC): Promise<AbortController>;
export declare function calculateExpectedSignatureSize(newIpns: Omit<CommunityIpfsType, "signature" | "posts"> | Omit<CommentUpdateType, "signature" | "posts">): number;
export declare function deriveCommentIpfsFromCommentTableRow(commentTableRow: CommentsTableRow): CommentIpfsType;
type InlineRepliesBudgetOptions = {
    comment: CommentsTableRow;
    commentUpdateWithoutReplies: Omit<CommentUpdateType, "signature">;
    maxCommentUpdateBytes?: number;
    maxPageBytes?: number;
    minInlineRepliesBytes?: number;
    hardInlineRepliesLimitBytes?: number;
    depthBufferBaseBytes?: number;
    depthBufferPerDepthBytes?: number;
    commentUpdateHeadroomBytes?: number;
    pageSafetyMarginBytes?: number;
    inlineMetadataBytes?: number;
};
export declare function calculateInlineRepliesBudget({ comment, commentUpdateWithoutReplies, maxCommentUpdateBytes, maxPageBytes, minInlineRepliesBytes, hardInlineRepliesLimitBytes, depthBufferBaseBytes, depthBufferPerDepthBytes, commentUpdateHeadroomBytes, pageSafetyMarginBytes, inlineMetadataBytes }: InlineRepliesBudgetOptions): number;
export declare function deriveDbReplies(opts: {
    replies: CommentUpdateType["replies"];
    allPageCids?: Record<string, string[]>;
}): DbRepliesFormat | undefined;
export declare function deriveDbPosts(opts: {
    posts: CommunityIpfsType["posts"];
    allPageCids?: Record<string, string[]>;
}): DbPostsFormat | undefined;
export declare function resolveDbPostsCidRefs(opts: {
    dbPosts: DbPostsFormat;
    dbHandler: DbHandler;
}): CommunityIpfsType["posts"];
export {};
