import React, {  } from 'react';
import { WhatsAppOutlined, MailOutlined } from '@ant-design/icons';
import { WABIcon,  } from '@/components/Icons';

const ChannelLogo = ({channel}) => {
  // if is array, get last
  if (Array.isArray(channel)) {
    channel = channel[channel.length - 1];
  }
  switch (channel) {
    case 'waba':
      return <WABIcon key={channel} className='text-whatsapp' />;
    case 'wa':
      return <WhatsAppOutlined key={channel} className='text-whatsapp' />;
    case 'email':
      return <MailOutlined key={channel} className='text-indigo-500' />
    default:
      // return <MailOutlined key={'channel'} className='text-indigo-500' />
      return <WABIcon key={channel} className='text-whatsapp' />;
  }
}
export default ChannelLogo;
