import AutoGraphRoundedIcon from '@mui/icons-material/AutoGraphRounded';
import CampaignRoundedIcon from '@mui/icons-material/CampaignRounded';
import LocalOfferRoundedIcon from '@mui/icons-material/LocalOfferRounded';
import NewReleasesRoundedIcon from '@mui/icons-material/NewReleasesRounded';

import type { EcommerceNews } from '../../config/defaultStoreConfig';

function NewsIcon({ type }: { type: EcommerceNews['type'] }) {
	if (type === 'producto_nuevo') {
		return <NewReleasesRoundedIcon fontSize="small" />;
	}

	if (type === 'campana') {
		return <CampaignRoundedIcon fontSize="small" />;
	}

	if (type === 'combo') {
		return <LocalOfferRoundedIcon fontSize="small" />;
	}

	if (type === 'b2b') {
		return <AutoGraphRoundedIcon fontSize="small" />;
	}

	return <CampaignRoundedIcon fontSize="small" />;
}

export default NewsIcon;
