import { OrderedListStyle } from '../../../extensions/types/paragraph-commands.js';
/**
 * SD-3240: OOXML element subtree as held inside `NumberingModel`
 * records. Recursive; each element has an optional name, attributes
 * map, and nested children.
 */
export interface NumberingElement {
    name?: string;
    attributes?: Record<string, unknown>;
    elements?: NumberingElement[];
    [key: string]: unknown;
}
/**
 * SD-3240: minimal shape internal callers read from numbering
 * abstract / definition records. The OOXML element tree lives at
 * `.elements`; specific tag-level fields are accessed via deeper
 * indexing that callers narrow locally.
 */
export interface NumberingRecord {
    name?: string;
    attributes?: Record<string, unknown>;
    elements?: NumberingElement[];
    [key: string]: unknown;
}
export interface NumberingModel {
    abstracts: Record<number, NumberingRecord>;
    definitions: Record<number, NumberingRecord>;
}
interface GenerateOptions {
    numId: number;
    listType: string;
    level?: number | null;
    start?: string | null;
    text?: string | null;
    fmt?: string | null;
    markerFontFamily?: string | null;
    bulletStyle?: 'disc' | 'circle' | 'square' | null;
    /**
     * Level (`w:ilvl`) at which to apply `bulletStyle`. Defaults to 0 (top-level).
     * Used when the user changes the bullet style for a nested list item — the
     * override needs to land on the paragraph's actual level.
     */
    bulletStyleLevel?: number | null;
    orderedStyle?: OrderedListStyle | null;
    /**
     * Level (`w:ilvl`) at which to apply `orderedStyle`. Defaults to 0 (top-level).
     * Used when the user changes the ordered style for a nested list item — the
     * override needs to land on the paragraph's actual level, and the lvlText
     * counter index (`%N`) needs to match that level.
     */
    orderedStyleLevel?: number | null;
}
interface GenerateResult {
    numId: number;
    abstractId: number;
    abstractDef: any;
    numDef: any;
}
declare function getNextId(group: Record<number, unknown>): number;
/**
 * Generate a new abstract + num definition and add them to the model.
 */
export declare function generateNewListDefinition(numbering: NumberingModel, options: GenerateOptions): GenerateResult;
/**
 * Clone an abstract and create a new num definition pointing to the clone.
 * Falls back to `generateNewListDefinition` if the source abstract is missing.
 */
export declare function changeNumIdSameAbstract(numbering: NumberingModel, numId: number, level: number, listType: string): {
    newNumId: number;
    generated: boolean;
};
/**
 * Remove a list definition (num + its abstract) from the model.
 */
export declare function removeListDefinitions(numbering: NumberingModel, listId: number): void;
/**
 * Set or update a lvlOverride entry on a num definition.
 */
export declare function setLvlOverride(numbering: NumberingModel, numId: number, ilvl: number, overrides: {
    startOverride?: number;
    lvlRestart?: number | null;
}): boolean;
/**
 * Remove a lvlOverride entry from a num definition.
 */
export declare function removeLvlOverride(numbering: NumberingModel, numId: number, ilvl: number): boolean;
/**
 * Create a new num definition pointing to an existing abstract.
 * Optionally copies lvlOverride entries from a source numId.
 */
export declare function createNumDefinition(numbering: NumberingModel, abstractNumId: number, options?: {
    copyOverridesFrom?: number;
}): {
    numId: number;
    numDef: any;
};
/**
 * Set or remove w:lvlRestart on an abstract definition level.
 */
export declare function setLvlRestartOnAbstract(numbering: NumberingModel, abstractNumId: number, ilvl: number, restartAfterLevel: number | null): boolean;
/**
 * Update the bullet/ordered style on a single level of an abstract definition.
 *
 * Returns `true` only when the abstract was actually changed — callers can use that
 * to skip downstream invalidation when the requested style already matches.
 */
export declare function setLvlStyleOnAbstract(numbering: NumberingModel, abstractNumId: number, ilvl: number, options: {
    bulletStyle?: 'disc' | 'circle' | 'square' | null;
    orderedStyle?: OrderedListStyle | null;
}): boolean;
/**
 * Deep-clone the abstract a `sourceNumId` points to, apply a style override at the given
 * level, and register both the cloned abstract and a fresh num definition that points to
 * it. Returns the new num/abstract IDs (or `null` if the source is missing).
 *
 * Used by toggle-list paths that need PM-tracked undo: callers migrate paragraphs from
 * the source num to the new num via `setNodeMarkup`, so reversing the markup steps
 * naturally reverts the style change — the source abstract is never touched.
 */
export declare function cloneListDefinitionWithLevelStyle(numbering: NumberingModel, sourceNumId: number, ilvl: number, options: {
    bulletStyle?: 'disc' | 'circle' | 'square' | null;
    orderedStyle?: OrderedListStyle | null;
}): {
    newNumId: number;
    newAbstractId: number;
} | null;
export { getNextId as getNextNumberingId };
//# sourceMappingURL=numbering-transforms.d.ts.map