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