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, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Magna rhoncus tristique gravida sem vulputate posuere urna pellentesque. Vestibulum odio nisi pretium, in turpis purus mattis morbi tellus a scelerisque.`,
  site_id: 1,
  country_id: 102,
  pages_count: 23,
  language_id: 1,
  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: '1675685947/ellipse-1.png',
  image_object: {
    width: '124',
    height: '124',
    url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/1675685947/ellipse-1.png',
    title: `Author ${index} Image Title `,
    alt: `Author ${index} Image Title Alt`,
    filename: '1675685947/ellipse-1.png',
  },
  country: {
    id: 102,
    code: 'IE',
    name: 'Ireland',
  },
  language: {
    id: 1,
    code: 'en',
    name: 'English',
  },
  knows_abouts: ['Thing One', 'Thing Two'],
  university: 'University of Malta',
  degree: 'BA (Hons) In Art & Design',
  pronouns: 'He/him/his',
  lives_in: "St Julian's, Malta",
  experience: 8,
  template: 'Default',
});

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;
}
