/*
 * Import FontAwesome Icons
 */

import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fab } from '@fortawesome/free-brands-svg-icons';

// Add all icons to the library for easier access
library.add( fas, far, fab );

// Create an array of all available icons for search functionality
const allIcons = [
	...Object.keys( fas ).map( key => ( { name: key, icon: fas[ key ] } ) ),
	...Object.keys( far ).map( key => ( { name: key, icon: far[ key ] } ) ),
	...Object.keys( fab ).map( key => ( { name: key, icon: fab[ key ] } ) ),
];

export { allIcons };
