export var getExtensionLozengeData = function getExtensionLozengeData(_ref) {
  var node = _ref.node,
    type = _ref.type;
  if (!node.attrs.parameters) {
    return;
  }
  var macroMetadata = node.attrs.parameters.macroMetadata;
  if (macroMetadata && macroMetadata.placeholder) {
    var placeholderData;
    macroMetadata.placeholder.forEach(function (placeholder) {
      if (placeholder.type === type && placeholder.data && placeholder.data.url) {
        placeholderData = placeholder.data;
      }
    });
    return placeholderData;
  }
  return;
};