import { connect } from "../../../redux";
import { getPlugins } from "../../../../plugins";
import { getActiveElement } from "../../../selectors";

var AdvancedAction = function AdvancedAction(_ref) {
  var elementType = _ref.elementType,
      children = _ref.children;
  var plugins = getPlugins("pb-editor-page-element-advanced-settings");

  if (!plugins.some(function (pl) {
    return pl.elementType === elementType;
  })) {
    return null;
  }

  return children;
};

export default connect(function (state) {
  return {
    elementType: getActiveElement(state).type
  };
})(AdvancedAction);
//# sourceMappingURL=AdvancedAction.js.map