{"size": 535, "ext": "js", "max_stars_repo_path": "src/site/stages/build/process-cms-exports/transformers/paragraph-button.js", "max_stars_repo_name": "indytechcook/content-build", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/site/stages/build/process-cms-exports/transformers/paragraph-button.js", "max_issues_repo_name": "indytechcook/content-build", "max_issues_repo_issues_event_min_datetime": "2021-04-08T19:02:00.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-20T15:04:36.000Z", "max_forks_repo_path": "src/site/stages/build/process-cms-exports/transformers/paragraph-button.js", "max_forks_repo_name": "indytechcook/content-build", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 126, "max_forks_count": null, "avg_line_length": 22.2916666667, "max_line_length": 64, "alphanum_fraction": 0.6224299065}
// Remove eslint-disable when transformer is complete
/* eslint-disable no-unused-vars */
const { getDrupalValue } = require('./helpers');

const transform = entity => {
  return {
    entity: {
      entityType: 'paragraph',
      entityBundle: 'button',
      fieldButtonLabel: getDrupalValue(entity.fieldButtonLabel),
      fieldButtonLink: {
        url: {
          path: entity.fieldButtonLink[0]?.uri,
        },
      },
    },
  };
};

module.exports = {
  filter: ['field_button_label', 'field_button_link'],
  transform,
};
