import { ValueTypeOf } from '@elaraai/east'; import { DiffBindingType } from '@elaraai/e3-ui/internal'; type DiffBindingValue = ValueTypeOf; export interface UseBindingValueResult { /** Current value (buffered if staged, otherwise server). `null` until the * binding has run or if the binding is absent. */ value: T | null; /** The binding's write mode — `'staged'` buffers edits until `commit()`, * `'direct'` writes through. `'direct'` when the binding is absent. */ mode: 'staged' | 'direct'; /** True when there is an in-flight staged change. */ pending: boolean; /** The read/decode error if the bound value failed to resolve (else `undefined`). * Surfaced so a binding failure shows an error instead of a perpetual "loading". */ error: unknown; /** Replace the bound value (staged buffers, direct writes through). */ mutate: (next: T) => void; /** Resolve the in-flight change. */ commit: () => Promise; /** Drop the in-flight change. */ discard: () => void; } /** * Resolve a {@link DiffBindingType} value (or `null`) into a live, reactive * value of type `T`, delegating to the shared bind runtime. */ export declare function useBindingValue(binding: DiffBindingValue | null): UseBindingValueResult; export {}; //# sourceMappingURL=bind-runtime.d.ts.map