import { ChannelType, PostMetadata } from '../db';
import { FinalizedAttachment } from '../domain';
import { Block, Inline, JSONContent, Story } from '../urbit';

export interface Mention {
    id: string;
    display: string;
    start: number;
    end: number;
}
export declare function textAndMentionsToContent(text: string, mentions: Mention[]): JSONContent;
export declare function contentToTextAndMentions(jsonContent: JSONContent): {
    text: string;
    mentions: Mention[];
};
/** helper to build similarly-shaped entry types */
type BuildPostBlobDataEntry<Type extends string, Config extends {
    version: number;
}, Payload extends Record<string, unknown>> = {
    type: Type;
    version: Config['version'];
} & Payload;
/**
 * An element of the `blob` array on an API resource for a post, used to hold
 * arbitrary off-schema data.
 */
export type PostBlobDataEntry = BuildPostBlobDataEntry<'file', {
    version: 1;
}, {
    fileUri: string;
    mimeType?: string;
    name?: string;
    /** in bytes */
    size: number;
}>;
export declare function appendFileUploadToPostBlob(blob: string | undefined, opts: {
    fileUri: string;
    mimeType?: string;
    name?: string;
    /** in bytes */
    size: number;
}): string;
/** Client-side parsed representation of PostBlob data */
export type ClientPostBlobData = Array<PostBlobDataEntry | {
    type: 'unknown';
}>;
export declare function parsePostBlob(blob: string): ClientPostBlobData;
export declare function toPostData({ attachments, content, image, channelType, title, }: {
    content: (Inline | Block)[];
    attachments: FinalizedAttachment[];
    channelType: ChannelType;
    title?: string;
    image?: string;
}): {
    story: Story;
    metadata: PostMetadata;
    blob?: string;
};
export {};
//# sourceMappingURL=content-helpers.d.ts.map