var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/store/createStore.ts
var createStore_exports = {};
__export(createStore_exports, {
  createStore: () => createStore
});
module.exports = __toCommonJS(createStore_exports);
function createStore(initialState, moduleName, onChange) {
  const handler = {
    get(target, prop, receiver) {
      const value = Reflect.get(target, prop, receiver);
      return value;
    },
    set(target, prop, value, receiver) {
      const result = Reflect.set(target, prop, value, receiver);
      onChange == null ? void 0 : onChange(`${String(prop)}`, value);
      return result;
    },
    deleteProperty(target, prop) {
      return Reflect.deleteProperty(target, prop);
    }
  };
  const proxy = new Proxy(initialState, handler);
  return { proxy };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  createStore
});
