import { useMemo } from "react";
import useEngineContext from "./useEngineContext";
var useComponents = function useComponents(params) {
  var components = params.components;
  var context = useEngineContext();
  var appHelper = context.appHelper;
  var Cpt = useMemo(function () {
    var _utils$getComponents;
    var _ref = appHelper || {},
      utils = _ref.utils;
    return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
  }, [components]);
  return Cpt;
};
export default useComponents;