/**
 * Default hero logo repeater items (plugin sample assets).
 */

export const SAMPLE_LOGO_PATHS = [
	'assets/images/logos/logo-1.svg',
	'assets/images/logos/logo-2.svg',
	'assets/images/logos/logo-3.svg',
];

/**
 * @param {number} index
 * @return {object}
 */
export function sampleLogoItem( index = 0 ) {
	const path =
		SAMPLE_LOGO_PATHS[ index % SAMPLE_LOGO_PATHS.length ] ||
		SAMPLE_LOGO_PATHS[ 0 ];
	return {
		image: {
			id: 0,
			url: `bm-asset:${ path }`,
			alt: `Logo ${ ( index % SAMPLE_LOGO_PATHS.length ) + 1 }`,
			mime: 'image/svg+xml',
			type: 'image',
		},
	};
}

/**
 * @return {object[]}
 */
export function defaultLogoItems() {
	return SAMPLE_LOGO_PATHS.map( ( _, index ) => sampleLogoItem( index ) );
}
