import { PersistedSlice } from './PersistedSlice';
import { SliceStacking } from './constants';
import { MarkerSlice } from './MarkerSlice';
import { UndEndIterator, type UndEndNext } from '../../../util/iterator';
import type { Range } from '../rga/Range';
import type { Slice, SliceType } from './types';
import type { ITimestampStruct } from '../../../json-crdt-patch/clock';
import type { Stateful } from '../types';
import type { Printable } from 'tree-dump/lib/types';
import type { ArrChunk, ArrNode } from '../../../json-crdt/nodes';
import type { AbstractRga } from '../../../json-crdt/nodes/rga';
import type { Peritext } from '../Peritext';
export declare class Slices<T = string> implements Stateful, Printable {
    /** The text RGA. */
    protected readonly txt: Peritext<T>;
    /** The `arr` node, used as a set, where slices are stored. */
    readonly set: ArrNode;
    private list;
    protected readonly rga: AbstractRga<T>;
    constructor(
    /** The text RGA. */
    txt: Peritext<T>, 
    /** The `arr` node, used as a set, where slices are stored. */
    set: ArrNode);
    ins<S extends PersistedSlice<T>, K extends new (...args: ConstructorParameters<typeof PersistedSlice<T>>) => S>(range: Range<T>, stacking: SliceStacking, type: SliceType, data?: unknown, Klass?: K): S;
    insMarker(range: Range<T>, type: SliceType, data?: unknown | ITimestampStruct): MarkerSlice<T>;
    insMarkerAfter(after: ITimestampStruct, type: SliceType, data?: unknown, separator?: string): MarkerSlice<T>;
    insStack(range: Range<T>, type: SliceType, data?: unknown | ITimestampStruct): PersistedSlice<T>;
    insOne(range: Range<T>, type: SliceType, data?: unknown | ITimestampStruct): PersistedSlice<T>;
    insErase(range: Range<T>, type: SliceType, data?: unknown | ITimestampStruct): PersistedSlice<T>;
    protected unpack(chunk: ArrChunk): PersistedSlice<T>;
    get(id: ITimestampStruct): PersistedSlice<T> | undefined;
    del(id: ITimestampStruct): void;
    delSlices(slices: Iterable<Slice<T>>): boolean;
    size(): number;
    /**
     * @todo Rename to `each0`.
     */
    iterator0(): UndEndNext<PersistedSlice<T>>;
    each(): UndEndIterator<PersistedSlice<T>>;
    forEach(callback: (item: PersistedSlice<T>) => void): void;
    private _topologyHash;
    hash: number;
    refresh(): number;
    toStringName(): string;
    toString(tab?: string): string;
}
