import { inject as n, reactive as i, watch as u, provide as a } from "vue";
const d = (o, e = {}) => {
  const r = {
    store: o,
    options: e
  };
  n("TopStoreOnInits", []).forEach((t) => {
    t.call(r);
  });
}, p = (o, e, r, s) => {
  const t = i(e());
  return t.$id = r, t.$subscribe = (c) => {
    u(t, () => c(), { deep: !0 });
  }, d(t, s), a(o, t), t;
}, f = (o) => {
  const e = n(o);
  if (!e)
    throw Error("Попытка использовать Store до его инициализации, убедитесь, что defineStore() вызван в setup() необходимого компонента");
  return e;
}, h = {
  defineStore: p,
  useStore: f
};
export {
  p as d,
  h as s,
  f as u
};
//# sourceMappingURL=store-CX_6ZXhO.es.js.map
