"use client";
import { useCallback } from "react";
import { usePersistedBooleanFlag } from "./usePersistedBooleanFlag.js";
function getStorageKey(pageType) {
  return `om:zone1-collapsed:${pageType}`;
}
function useZoneCollapse(pageType) {
  const { value: collapsed, toggle, setValue, isHydrated } = usePersistedBooleanFlag(
    getStorageKey(pageType),
    false
  );
  const setCollapsed = useCallback((next) => {
    if (typeof next === "function") {
      setValue((prev) => next(prev));
    } else {
      setValue(next);
    }
  }, [setValue]);
  return { collapsed, toggle, setCollapsed, isHydrated };
}
export {
  useZoneCollapse
};
//# sourceMappingURL=useZoneCollapse.js.map
