import { PRELOADERS } from '../../../utils/preloaders';

const Loading = ( { id, className } ) => {
	const loaderNo = window.rbfb?.settings?.appearance?.preloader ?? 1;

	const findLoader = PRELOADERS.find( ( item ) => item.id === loaderNo );

	const loader = findLoader ? findLoader.icon : PRELOADERS[ 0 ].icon;

	return <>{ loader }</>;
};

export default Loading;
