import { MicroStoreActions, Selector } from "./reuseMicroStore/types.cjs";
import { MicroStoreConfig, ReactUseMicroStore } from "./types.cjs";
//#region src/createMicroStore/createMicroStore.d.ts
/**
* Creates a tools micro-store and returns a React-ready hook for it.
*
* The parameters match `createMicroStore` from `@pastweb/tools`. The returned
* hook uses {@link reuseMicroStore} internally, so React components re-render
* when the selected micro-store state changes.
*
* @typeParam S - Micro-store state shape.
* @typeParam A - Micro-store action shape.
* @param name - Unique store name.
* @param setup - Tools micro-store setup function.
* @returns React hook for reading the micro-store.
*
* @example
* ```tsx
* const useCounterStore = createMicroStore('counter', () => ({
* state: { count: 0 },
* actions: {
* increment() {
* this.state.count += 1;
* },
* },
* }));
*
* function Counter() {
* const counter = useCounterStore(state => state.count);
*
* return ;
* }
* ```
*/
declare function createMicroStore, A extends MicroStoreActions>(name: string, setup: (select: (fn: Selector) => T) => MicroStoreConfig): ReactUseMicroStore;
//#endregion
export { createMicroStore };
//# sourceMappingURL=createMicroStore.d.cts.map