import { HeaderFooterKind, HeaderFooterVariant, SectionAddress, SectionMutationResult } from '../../../../../../document-api/src/index.js';
import { Editor } from '../../core/Editor.js';
import { SectionProjection } from './sections-resolver.js';
import { XmlElement } from './sections-xml.js';
import { ConverterWithHeaderFooterParts } from './header-footer-parts.js';
/**
 * Walk the section chain to find the effective header/footer ref.
 * Tries the requested variant at each section, falling back to 'default'.
 * Returns null if no ref found in any section.
 */
export declare function resolveEffectiveRef(sections: SectionProjection[], startSectionIndex: number, kind: HeaderFooterKind, variant: HeaderFooterVariant): {
    refId: string;
    resolvedFromSection: SectionAddress;
    resolvedVariant: HeaderFooterVariant;
} | null;
/**
 * Inner mutation for setting an explicit header/footer ref on a sectPr.
 * Returns a failure result to short-circuit, or void to let the outer wrapper detect changes.
 */
export declare function setHeaderFooterRefMutation(sectPr: XmlElement, kind: HeaderFooterKind, variant: HeaderFooterVariant, refId: string, converter: ConverterWithHeaderFooterParts | null, operationName: string, dryRun?: boolean): SectionMutationResult | void;
/**
 * Inner mutation for clearing an explicit header/footer ref from a sectPr.
 * Also reconciles variant pointers on HeaderFooterVariantIds.
 */
export declare function clearHeaderFooterRefMutation(sectPr: XmlElement, kind: HeaderFooterKind, variant: HeaderFooterVariant, converter: ConverterWithHeaderFooterParts | null, dryRun?: boolean): void;
/**
 * Inner mutation for link/unlink behavior.
 * For linked=true: removes explicit ref.
 * For linked=false: uses resolveEffectiveRef to walk the full chain, then clones.
 */
export declare function setLinkedToPreviousMutation(sectPr: XmlElement, projection: SectionProjection, sections: SectionProjection[], kind: HeaderFooterKind, variant: HeaderFooterVariant, linked: boolean, editor: Editor, dryRun: boolean, operationName: string): SectionMutationResult | void;
/**
 * Allocate an explicit header/footer reference, creating a new part.
 */
export declare function createExplicitHeaderFooterReference(editor: Editor, input: {
    kind: HeaderFooterKind;
    sourceRefId?: string;
}): string | null;
//# sourceMappingURL=header-footer-refs-mutation.d.ts.map