/**
 * @license
 * Copyright 2026 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
export type StyleSpan = {
    length: number;
    formatFlags: number;
    fgColor?: string;
    bgColor?: string;
    link?: string;
};
export declare class StyledLine {
    static empty(length: number): StyledLine;
    static legacyCreateStyledLine(values?: string[], spans?: StyleSpan[]): StyledLine;
    private static readonly emptyCache;
    length: number;
    private text;
    private charData;
    private spans;
    private _cachedTrimmedLength?;
    constructor();
    getValue(index: number): string;
    getSpan(index: number): StyleSpan | undefined;
    getFullWidth(index: number): boolean;
    hasStyles(index: number): boolean;
    getFormatFlags(index: number): number;
    getFgColor(index: number): string | undefined;
    getBgColor(index: number): string | undefined;
    getLink(index: number): string | undefined;
    setInverted(index: number, inverted: boolean): void;
    setBackgroundColor(index: number, color: string | undefined): void;
    setForegroundColor(index: number, color: string | undefined): void;
    setChar(index: number, value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
    pushChar(value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
    clone(): StyledLine;
    slice(start: number, end?: number): StyledLine;
    combine(...others: StyledLine[]): StyledLine;
    getTrimmedLength(): number;
    trimEnd(): StyledLine;
    equals(other: StyledLine): boolean;
    getText(): string;
    getSpans(): StyleSpan[];
    getValues(): string[];
    [Symbol.iterator](): Generator<{
        value: string;
        formatFlags: number;
        fgColor: string | undefined;
        bgColor: string | undefined;
        link: string | undefined;
        fullWidth: boolean;
        hasStyles: boolean;
    }, void, unknown>;
    private ensureInitialized;
    private applyValuesAndSpans;
    private splitSpansAt;
    private mergeSpans;
}
