import * as Y from 'yjs';
export interface Tab {
    id: string;
    name: string;
    emoji: string | null;
}
export interface TabsYdocNodes {
    order: Y.Array<string>;
    nameById: Y.Map<string>;
    emojiById: Y.Map<string | null>;
    tabState: Y.Map<unknown>;
    deletedById: Y.Map<boolean>;
}
export interface SyncedTabsYdocNodes extends TabsYdocNodes {
    didWrite: boolean;
}
interface TabSyncOptions {
    createDefaultTabIfMissing?: boolean;
}
export declare const DEFAULT_TAB_ID = "default";
export declare const DEFAULT_TAB_NAME = "Tab 1";
export declare const LEGACY_ROOT_KEY = "ddocTabs";
export declare const ORDER_ROOT_KEY = "tabs_order";
export declare const NAME_ROOT_KEY = "tabs_name_registry";
export declare const EMOJI_ROOT_KEY = "tabs_emoji_registry";
export declare const STATE_ROOT_KEY = "tabs_state";
export declare const DELETED_ROOT_KEY = "tabs_delete_registry";
export declare const ACTIVE_TAB_STATE_KEY = "activeTabId";
export declare function syncTabState(doc: Y.Doc, options?: TabSyncOptions, transactionOrigin?: unknown): boolean;
export declare function deriveTabsFromEncodedState(yjsEncodedState: string | string[] | null | undefined, doc: Y.Doc, options?: TabSyncOptions): {
    tabList: Tab[];
    activeTabId: string;
    didWrite: boolean;
};
export declare function getTabsYdocNodes(doc: Y.Doc): TabsYdocNodes;
export declare function syncTabStateAndGetNodes(doc: Y.Doc, options?: TabSyncOptions, transactionOrigin?: unknown): SyncedTabsYdocNodes;
export declare function mergeTabAwareYjsUpdates(encodedUpdates: string[], options?: TabSyncOptions): string;
export declare function getActiveTabIdFromNodes(tabNodes: Pick<TabsYdocNodes, 'tabState'>): string | null;
export declare function getTabMetadata(tabNodes: Pick<TabsYdocNodes, 'nameById' | 'emojiById'>, tabId: string): {
    name: string;
    emoji: string | null;
} | null;
export declare function getTabListFromNodes(tabNodes: Pick<TabsYdocNodes, 'order' | 'nameById' | 'emojiById'>): Tab[];
export declare function cloneFragmentContent(fragment: Y.XmlFragment): (Y.XmlElement | Y.XmlText)[];
export {};
