import type { CommitControls } from "./commit_mode"; /** * THE SELF-COMMITTING ARM, in one place: every control that takes `onSave` drives * its draft through this hook, so the four things that make a field safe to write * from are written once — 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; /** Equality used to skip a no-op save. Defaults to `===`. */ 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; };