package com.datarecovery.master.data.consts;

import com.atmob.user.AtmobUser;

public class ChannelHelper {


    public static boolean isTargetSDChannel(String targetChannel) {
        if (AtmobUser.getAtmobTgPlatformId() != ChannelId.SD) {
            return false;
        }
        String atmobChannel = AtmobUser.getAtmobChannel();
        if (atmobChannel == null || targetChannel == null) {
            return false;
        }
        int index = atmobChannel.indexOf(targetChannel, atmobChannel.length() - targetChannel.length());
        return index != -1;
    }


    public static boolean isTargetSuffixChannel(String targetChannel) {
        String atmobChannel = AtmobUser.getAtmobChannel();
        if (atmobChannel == null || targetChannel == null) {
            return false;
        }
        int index = atmobChannel.indexOf(targetChannel, atmobChannel.length() - targetChannel.length());
        return index != -1;
    }

}
