/**
 * Factory to retrieve data for the carousel
 */

/**
 * @name getCarouselItem
 * @description Mock data for a single carousel item
 * @param {number} id id for the item
 * @return {Object}
 */
export function getCarouselItem(id = 1) {
  const carouselItem = {
    title: `title ${id}`,
    content: `content ${id}`,
    label: `label-${id}`,
  };

  return carouselItem;
}

/**
 * @name getListCarouselItem
 * @description Mock data for carousel with list of slides
 * @param {number} totalItems amount of slides on the carousel
 * @return {Array} with the list of carousel items
 */
export function getListCarouselItem(totalItems = 1) {
  const module = {
    items: [],
  };
  for (let i = 1; i <= totalItems; i += 1) {
    const item = getCarouselItem(i);
    module.items.push(item);
  }
  return module;
}
