import { AtpAgent } from '../agent';
import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client';
import { UnicodeString } from './unicode';
export declare type Facet = AppBskyRichtextFacet.Main;
export declare type FacetLink = AppBskyRichtextFacet.Link;
export declare type FacetMention = AppBskyRichtextFacet.Mention;
export declare type FacetTag = AppBskyRichtextFacet.Tag;
export declare type Entity = AppBskyFeedPost.Entity;
export interface RichTextProps {
    text: string;
    facets?: Facet[];
    entities?: Entity[];
}
export interface RichTextOpts {
    cleanNewlines?: boolean;
}
export declare class RichTextSegment {
    text: string;
    facet?: AppBskyRichtextFacet.Main | undefined;
    constructor(text: string, facet?: AppBskyRichtextFacet.Main | undefined);
    get link(): FacetLink | undefined;
    isLink(): boolean;
    get mention(): FacetMention | undefined;
    isMention(): boolean;
    get tag(): FacetTag | undefined;
    isTag(): boolean;
}
export declare class RichText {
    unicodeText: UnicodeString;
    facets?: Facet[];
    constructor(props: RichTextProps, opts?: RichTextOpts);
    get text(): string;
    get length(): number;
    get graphemeLength(): number;
    clone(): RichText;
    copyInto(target: RichText): void;
    segments(): Generator<RichTextSegment, void, void>;
    insert(insertIndex: number, insertText: string): this;
    delete(removeStartIndex: number, removeEndIndex: number): this;
    detectFacets(agent: AtpAgent): Promise<void>;
    detectFacetsWithoutResolution(): void;
}
