import { watch as a, ref as l } from "vue";
import { notEmpty as n } from "@milaboratories/helpers";
const o = /* @__PURE__ */ new Map();
function c(t) {
  return o.has(t) || o.set(t, l(localStorage.getItem(t))), n(o.get(t), "...");
}
function u(t, e) {
  e == null ? localStorage.removeItem(t) : localStorage.setItem(t, e);
}
function f(t) {
  const e = c(t);
  return a(e, (r) => u(t, r)), e;
}
export {
  f as useLocalStorage
};
//# sourceMappingURL=useLocalStorage.js.map
