import { MutationOptions } from '../types/mutation-plan.types.js';
import { SelectionTarget, TargetLocator } from '../types/address.js';
import { SDMutationReceipt } from '../types/sd-contract.js';
import { SDReplaceInput } from '../types/structural-input.js';
import { StoryLocator } from '../types/story.types.js';
import { SelectionMutationAdapter } from '../selection-mutation.js';
import { WriteAdapter } from '../write/write.js';
/** Text replacement input: uses SelectionTarget / ref. */
export type TextReplaceInput = TargetLocator & {
    target?: SelectionTarget;
    ref?: string;
    text: string;
    /** Target a specific document story (body, header, footer, footnote, endnote). */
    in?: StoryLocator;
};
/**
 * Input payload for the `doc.replace` operation.
 *
 * Discrimination: presence of `content` (structural) vs `text` (text replacement).
 */
export type ReplaceInput = TextReplaceInput | SDReplaceInput;
/** Returns true when the input uses the structural SDFragment shape. */
export declare function isStructuralReplaceInput(input: ReplaceInput): input is SDReplaceInput;
export declare function executeReplace(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: ReplaceInput, options?: MutationOptions): SDMutationReceipt;
//# sourceMappingURL=replace.d.ts.map