import { Machine } from "./machine"; import { StateMachine } from "./types"; declare type Extend = C & { setValue?: (nextValue: C["value"]) => void; }; export declare const createControllableMachine: (config: StateMachine.MachineConfig, S, E>, opts?: StateMachine.MachineOptions, E> | undefined) => Machine, S, E>; /** * Takes a machine that has `value` in its context and makes it controllable * by handling `value`, `defaultValue` and `onChange` */ export declare const useControllableMachine: , S extends string, E extends StateMachine.EventObject = StateMachine.AnyEventObject>(machine: Machine, props: Partial & { defaultValue?: C["value"] | (() => C["value"]) | undefined; onChange?: ((nextValue: C["value"]) => void) | undefined; }) => readonly [{ [x: string]: any; current: string; prev: string; event: string | string[]; context: import("valtio").NonPromise; done: boolean; matches: (value: string | string[]) => boolean; hasTag: (value: string) => boolean; nextEvents: string[]; changed: boolean; tags: { add: (value: string) => Set; clear: () => void; delete: (value: string) => boolean; forEach: (callbackfn: (value: string, value2: string, set: Set) => void, thisArg?: any) => void; has: (value: string) => boolean; readonly size: number; entries: () => IterableIterator<[string, string]>; keys: () => IterableIterator; values: () => IterableIterator; }; }, (evt: string | StateMachine.AnyEventObject) => void]; export {}; //# sourceMappingURL=use-controllable-machine.d.ts.map