import { useRef as _, useEffect as T, useState as s } from "react";
const R = () => {
  const t = _(!1);
  return T(() => (t.current = !0, () => {
    t.current = !1;
  }), []), t;
};
var u = /* @__PURE__ */ ((t) => (t.SPACE_ID = "spaceId", t.SIDEBAR_WIDTH = "sidebarWidth", t.CURRENT_USER = "currentUser", t.DIFF_VIEW_STYLE = "DIFF_VIEW_STYLE", t.PULL_REQUEST_CREATION_OPTION = "PULL_REQUEST_CREATION_OPTION", t.PULL_REQUEST_ACTIVITY_FILTER = "PULL_REQUEST_ACTIVITY_FILTER", t.PULL_REQUEST_ACTIVITY_ORDER = "PULL_REQUEST_ACTIVITY_ORDER", t))(u || {});
function L(t, o) {
  const [E, a] = s(() => {
    try {
      const r = localStorage.getItem(t);
      return r ? JSON.parse(r) : o;
    } catch (r) {
      return console.error("Error reading from localStorage:", r), o;
    }
  });
  return [E, (r) => {
    try {
      a(r), localStorage.setItem(t, JSON.stringify(r));
    } catch (I) {
      console.error("Error writing to localStorage:", I);
    }
  }];
}
export {
  u as U,
  R as a,
  L as u
};
//# sourceMappingURL=use-local-storage-m-P0qP0B.js.map
