{"version":3,"sources":["../../src/react/create-with-hooks.ts"],"sourcesContent":["import { createVanilla } from '../vanilla/index.js'\nimport { withUseSnapshot, withUseSubscribe } from './enhancers/index.js'\n\nimport type { ExpandType } from '../utils/index.js'\nimport type { SnapshotSelector } from '../vanilla/index.js'\nimport type { WithUseSnapshotContributes, WithUseSubscribeContributes } from './enhancers/index.js'\nimport type { StoreCreateOptions, VanillaStore } from '../vanilla/create.js'\nimport type {\n  WithSnapshotContributes,\n  WithSubscribeContributes,\n} from '../vanilla/enhancers/index.js'\nimport type { SnapshotOptions } from './use-snapshot.js'\n\nexport interface StoreUseSnapshot<State> {\n  (): State\n  (options: SnapshotOptions<State>): State\n  <StateSlice>(selector: SnapshotSelector<State, StateSlice>): StateSlice\n  <StateSlice>(selector: undefined, options: SnapshotOptions<StateSlice>): State\n  <StateSlice>(\n    selector: SnapshotSelector<State, StateSlice>,\n    options: SnapshotOptions<StateSlice>\n  ): StateSlice\n}\n\nexport interface Store<State extends object>\n  extends ExpandType<\n    VanillaStore<State> &\n      WithSubscribeContributes<State> &\n      WithSnapshotContributes<State> &\n      WithUseSnapshotContributes<State> &\n      WithUseSubscribeContributes<State>\n  > {}\n\nexport function createWithHooks<State extends object>(\n  initialState: State,\n  options: StoreCreateOptions = {}\n): Store<State> {\n  return withUseSnapshot(withUseSubscribe(createVanilla<State>(initialState, options)))\n}\n"],"names":["createWithHooks","initialState","options","withUseSnapshot","withUseSubscribe","createVanilla"],"mappings":";;;;+BAiCgBA;;;eAAAA;;;;;AAAT,SAASA,gBACdC,YAAmB;QACnBC,UAAAA,iEAA8B,CAAC;IAE/B,OAAOC,IAAAA,0BAAe,EAACC,IAAAA,2BAAgB,EAACC,IAAAA,uBAAa,EAAQJ,cAAcC;AAC7E"}