import { type TypedHook } from "../../hooks/index.ts";
import type { Atom } from "../index.js";
export declare function useAtomHook<Kind extends Atom.Flavor.Kind, Variant extends Atom.Flavor.Variant, Value, Result = Value>(props: UseAtomHook.Props<Kind, Variant, Value, Result>): Result | undefined;
export declare namespace UseAtomHook {
    interface Props<Kind extends Atom.Flavor.Kind, Variant extends Atom.Flavor.Variant, Value, Result = Value> {
        enable?: boolean | undefined;
        atom: Atom.Envelop<Kind, Variant, Atom.Def<Value>>;
        getValue: TypedHook.Memoized<() => Value>;
        shouldRender?: TypedHook.Memoized<ShouldRender<Value>>;
        watch?: TypedHook.Memoized<Watch<Value>>;
        toResult?: TypedHook.Memoized<ToResult<Value, Result>>;
    }
    interface Ref<Value> {
        id: string;
        value: Value | undefined;
        enable: boolean;
    }
    type ShouldRender<Value> = (prevValue: Value | undefined, nextValue: Value) => boolean;
    interface WatchProps<Value> {
        valueRef: React.MutableRefObject<Ref<Value>>;
        rerender: () => void;
    }
    type Watch<Value> = (props: WatchProps<Value>) => Atom.Unwatch;
    type ToResult<Value, Result> = (value: Value | undefined) => Result | undefined;
}
//# sourceMappingURL=index.d.ts.map