import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
/* "use client" */

import { useEffect, useState } from 'react';
import { isBrowser } from './collections';
var useSSR = function useSSR() {
  var _useState = useState(false),
    _useState2 = _slicedToArray(_useState, 2),
    browser = _useState2[0],
    setBrowser = _useState2[1];
  useEffect(function () {
    setBrowser(isBrowser());
  }, []);
  return {
    isBrowser: browser,
    isServer: !browser
  };
};
export default useSSR;