import type { CommitControls } from "./commit_mode"; /** The self-committing arm for every `onSave` control, writing once what makes a field safe: the * pending/echo mask, the exactly-once exit, saving and error in place, and `trackCommit` registration. */ export declare function useFieldCommit(opts: { value: T; onSave: (next: T) => void | Promise; /** "blur" (default) commits on blur; "buttons" makes a stray blur inert. */ controls?: CommitControls; /** Skips a no-op save; `===` by default. */ equals?: (a: T, b: T) => boolean; }): { editing: boolean; draft: T; setDraft: (next: T) => void; saving: boolean; error: string | null; begin: () => void; cancel: () => void; commit: (next?: T | undefined) => Promise; blur: () => void; current: T; };