"use strict";

exports.__esModule = true;
exports.useEnvironment = useEnvironment;
var _react = require("react");
var _dashboard = require("@wix/dashboard");
function useEnvironment() {
  const [environment, setEnvironment] = (0, _react.useState)();
  (0, _react.useEffect)(() => {
    const {
      disconnect
    } = _dashboard.dashboard.observeState((_, env) => {
      setEnvironment(env);
    });
    return disconnect;
  }, []);
  return environment;
}
//# sourceMappingURL=useEnvironment.js.map