const getDefaultProps = (index = 1) => ({
  name: `Author ${index} Name`,
  image_alt: `Author ${index} Name Alt`,
  profile_page_path: `about-us/test-author/${index}`,
  ribbon_label: 'Sportsbook Expert',
  expertise: ['Sports Betting', 'Betting Sites', 'Sportsbook Analysis'],
  image_asset_id: 96414,
  biography: `Author ${index} Biography`,
  site_id: 1,
  country_id: 102,
  language_id: 1,
  pages_count: 358,
  twitter_profile: 'https://twitter.com/',
  facebook_profile: 'https://facebook.com/',
  linkedin_profile: 'https://linkedin.com/',
  instagram_profile: 'https://instagram.com/',
  tik_tok: 'https://tiktok.com/',
  personal_website: '/',
  email_address: `test.author.${index}@site.com`,
  author_title: 'Irish Sportsbook Specialist',
  additional_url: null,
  image: '1666946055/siobhan-aslett.png',
  image_object: {
    width: '124',
    height: '124',
    url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/1666946055/siobhan-aslett.png',
    title: `Author ${index} Image Title `,
    alt: `Author ${index} Image Title Alt`,
    filename: '1666946055/siobhan-aslett.png',
  },
  country: {
    id: 102,
    code: 'IE',
    name: 'Ireland',
  },
  language: {
    id: 1,
    code: 'en',
    name: 'English',
  },
  knows_abouts: ['Thing One', 'Thing Two'],
});

export default function getAuthorList({ template, count = 1, id = 1, ...customProps }) {
  const authorList = {};
  // eslint-disable-next-line no-plusplus
  for (let index = id; index < id + count; index++) {
    authorList[index] = {
      id: index,
      ...getDefaultProps(index),
      ...customProps,
    };
  }
  return authorList;
}
