import { registerPlugins } from "../../plugins";
import pagePluginRenderWrapper from "./renderPluginsWrapper";
export var registerPRCustomPlugin = function registerPRCustomPlugin(customPlugin) {
  var plugins = pagePluginRenderWrapper(customPlugin()) || [];
  registerPlugins(plugins);
};
export var registerPRCustomPlugins = function registerPRCustomPlugins(customPlugins) {
  if (customPlugins && customPlugins.length > 0) {
    var itemPlugins = [];
    customPlugins.forEach(function (func) {
      var itemPlugin = pagePluginRenderWrapper(func()) || [];
      itemPlugins.push(itemPlugin);
    });

    if (itemPlugins.length > 0) {
      registerPlugins(itemPlugins);
    }
  }
};
//# sourceMappingURL=index.js.map