2021-03-09 14:22:14 +00:00
|
|
|
import { INBOX_TYPES } from 'shared/mixins/inboxMixin';
|
|
|
|
|
|
|
|
export const getInboxClassByType = (type, phoneNumber) => {
|
|
|
|
switch (type) {
|
|
|
|
case INBOX_TYPES.WEB:
|
|
|
|
return 'ion-earth';
|
|
|
|
|
|
|
|
case INBOX_TYPES.FB:
|
|
|
|
return 'ion-social-facebook';
|
|
|
|
|
|
|
|
case INBOX_TYPES.TWITTER:
|
|
|
|
return 'ion-social-twitter';
|
|
|
|
|
|
|
|
case INBOX_TYPES.TWILIO:
|
|
|
|
return phoneNumber.startsWith('whatsapp')
|
|
|
|
? 'ion-social-whatsapp-outline'
|
|
|
|
: 'ion-android-textsms';
|
|
|
|
|
2021-10-05 18:05:06 +00:00
|
|
|
case INBOX_TYPES.WHATSAPP:
|
|
|
|
return 'ion-social-whatsapp-outline';
|
|
|
|
|
2021-03-09 14:22:14 +00:00
|
|
|
case INBOX_TYPES.API:
|
|
|
|
return 'ion-cloud';
|
|
|
|
|
|
|
|
case INBOX_TYPES.EMAIL:
|
2021-03-14 08:40:16 +00:00
|
|
|
return 'ion-ios-email';
|
2021-03-09 14:22:14 +00:00
|
|
|
|
2021-09-15 12:42:56 +00:00
|
|
|
case INBOX_TYPES.TELEGRAM:
|
|
|
|
return 'ion-ios-navigate';
|
|
|
|
|
2021-03-09 14:22:14 +00:00
|
|
|
default:
|
2021-09-15 12:42:56 +00:00
|
|
|
return 'ion-ios-chatbubble';
|
2021-03-09 14:22:14 +00:00
|
|
|
}
|
|
|
|
};
|