import { c as PersistOptions, o as PersistApi } from "../persist-core-B649IGlX.mjs";
import { StoreApi } from "zustand";

//#region src/adapters/sources/zustand.d.ts
/**
 * Persist a zustand store. zustand's `getState`/`setState`/`subscribe` map
 * directly to `PersistableSource`.
 *
 * @example
 * ```ts
 * import { create } from "zustand";
 * import { createJSONStorage } from "@stainless-code/persist";
 * import { persistStore } from "@stainless-code/persist/sources/zustand";
 * const store = create(() => ({ count: 0 }));
 * const persist = persistStore(store, { name: "count", storage: createJSONStorage(() => localStorage) });
 * ```
 */
declare function persistStore<TState, TPersistedState = TState>(store: StoreApi<TState>, options: PersistOptions<TState, TPersistedState>): PersistApi<TState, TPersistedState>;
//#endregion
export { persistStore };