import { R as ReadonlyNonBasic, a as CreateOptions, C as Cache, O as Options } from './provider-BhdFdRyp.js'; export { E as EventBus, P as Provider, d as debounce, e as emitPersistReady, o as onPersistReady } from './provider-BhdFdRyp.js'; import 'react'; /** * @deprecated Please use `create`, `createOne` will remove in 2.0 */ declare const createOne: typeof create; declare function create(initialState: ReadonlyNonBasic, options?: CreateOptions): readonly [() => readonly [ReadonlyNonBasic, (newValue: ReadonlyNonBasic | ((oldState: ReadonlyNonBasic) => ReadonlyNonBasic)) => void], { getState: () => ReadonlyNonBasic; /** * @deprecated Please use `.setState`, `.replaceState` will remove in 2.0 */ replaceState: (newValue: ReadonlyNonBasic | ((oldState: ReadonlyNonBasic) => ReadonlyNonBasic)) => void; setState: (newValue: ReadonlyNonBasic | ((oldState: ReadonlyNonBasic) => ReadonlyNonBasic)) => void; forceUpdate: () => void; syncState: (newValue: ReadonlyNonBasic | ((oldState: ReadonlyNonBasic) => ReadonlyNonBasic)) => void; subscribe: (_callback: (state: ReadonlyNonBasic) => void) => () => void; destroy: () => void; }]; type Store = ReturnType>[1]; declare const isClient: boolean; declare const wrapState: (state: T) => T & { ready: boolean; }; declare const persistStore: (store: { readonly getState: () => any; readonly setState: (newValue: any) => void; readonly forceUpdate: () => void; readonly syncState: (newValue: any) => void; readonly subscribe: (callback: (state: any) => void) => () => void; readonly destroy: () => void; }, options: { key: string; debounce?: number | undefined; cache?: Cache | undefined; encode?: ((state: T) => string) | undefined; decode?: ((data: string) => T) | undefined; transform?: ((state: T) => T) | undefined; }) => Promise<() => void>; declare const usePersist: (_options: Options) => (boolean | (() => null))[]; export { type Store, create, createOne, isClient, persistStore, usePersist, wrapState };