import type { ComputedRef, WritableComputedRef } from 'vue';
export type FieldValueController<T> = {
    /**
     * Live draft — bind to the input's `v-model`. Updates on every keystroke,
     * but does NOT reach form state until `commit()` runs.
     */
    draft: WritableComputedRef<T>;
    /** `true` while the draft holds an uncommitted user edit. */
    dirty: ComputedRef<boolean>;
    /** Flush the draft into form state. Wire to `@blur` / Enter / clear. */
    commit: () => void;
};
export type FieldValueOptions<T> = {
    /** Bound dot-prop path; `undefined` ⇒ uncontrolled (no form-state slot). */
    binding: () => string | undefined;
    /** Normalize a raw form-state value into the display-typed draft. */
    fromState: (raw: unknown) => T;
    /** Normalize the draft into the value written to form state. */
    toState: (draft: T) => unknown;
    /** Equality for dirty-detection; defaults to `Object.is`. */
    equals?: (a: T, b: T) => boolean;
};
/**
 * Splits a text-like field's value into a live `draft` and the committed
 * form-state value. Keystrokes move the draft; `commit()` (wired to blur) is
 * the only thing that writes form state — so every CEL expression and
 * derived value reading `form` sees a stable per-commit cadence rather than
 * per-keystroke churn.
 *
 * An external write to the committed value (initial seed, reset, parent
 * v-model, a later derived write-back) reverse-syncs into the draft — unless
 * the draft is dirty, so a mid-edit value the user has not committed is
 * never clobbered.
 */
export declare function useFieldValue<T>(options: FieldValueOptions<T>): FieldValueController<T>;
