"use strict";

exports.__esModule = true;
exports.useExperimentsCompat = useExperimentsCompat;
var _bexCore = require("@wix/bex-core");
var _yoshiFlowBm = require("@wix/yoshi-flow-bm");
var _react = require("react");
function useExperimentsCompat() {
  const [fallbackApi] = (0, _react.useState)(() => (0, _bexCore.experimentsFallbackApi)());
  try {
    // eslint-disable-next-line react-hooks/rules-of-hooks
    const {
      experiments
    } = (0, _yoshiFlowBm.useExperiments)() ?? {};
    return experiments ?? fallbackApi;
  } catch (e) {
    console.error(e);
    return fallbackApi;
  }
}
//# sourceMappingURL=useExperimentsCompat.js.map