导航菜单

页面标题

页面副标题

Vi App v10.18.0 - ActionBottomSheetDialogFragment.java 源代码

正在查看: Vi App v10.18.0 应用的 ActionBottomSheetDialogFragment.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.yupptv.ott.fragments;

import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestBuilder;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.CustomTarget;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.request.transition.Transition;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.google.android.material.imageview.ShapeableImageView;
import com.yupptv.ott.FusionViliteMainActivity;
import com.yupptv.ott.MoviesWebViewActivity;
import com.yupptv.ott.OTTApplication;
import com.yupptv.ott.R;
import com.yupptv.ott.adapters.ExitPopupAdapter;
import com.yupptv.ott.analytics.AnalyticsUtils;
import com.yupptv.ott.analytics.MyRecoManager;
import com.yupptv.ott.enums.ButtonType;
import com.yupptv.ott.enums.DialogType;
import com.yupptv.ott.enums.PageType;
import com.yupptv.ott.enums.PosterType;
import com.yupptv.ott.enums.ScreenType;
import com.yupptv.ott.fragments.ActionBottomSheetDialogFragment;
import com.yupptv.ott.interfaces.BottomButtonsActionListener;
import com.yupptv.ott.interfaces.DialogListener;
import com.yupptv.ott.models.BottomDataModel;
import com.yupptv.ott.models.RecordModel;
import com.yupptv.ott.player.ExoPlayerFragment;
import com.yupptv.ott.utils.APIUtils;
import com.yupptv.ott.utils.CleverTap;
import com.yupptv.ott.utils.Constants;
import com.yupptv.ott.utils.CustomLog;
import com.yupptv.ott.utils.NavigationConstants;
import com.yupptv.ott.utils.NavigationUtils;
import com.yupptv.ott.utils.Preferences;
import com.yupptv.ott.utils.UiUtils;
import com.yupptv.ott.utils.Utils;
import com.yupptv.ottsdk.OttSDK;
import com.yupptv.ottsdk.managers.MediaCatalog.MediaCatalogManager;
import com.yupptv.ottsdk.managers.Payment.PaymentManager;
import com.yupptv.ottsdk.managers.User.UserManager;
import com.yupptv.ottsdk.model.BottomTemplateInfo;
import com.yupptv.ottsdk.model.Card;
import com.yupptv.ottsdk.model.ContentPage;
import com.yupptv.ottsdk.model.DeeplinkInfo;
import com.yupptv.ottsdk.model.Error;
import com.yupptv.ottsdk.model.FormData;
import com.yupptv.ottsdk.model.PostpaidBillingConfirmationPopup;
import com.yupptv.ottsdk.model.Section;
import com.yupptv.ottsdk.model.User;
import com.yupptv.ottsdk.model.payments.OrderStatusResponse;
import com.yupptv.ottsdk.model.user.Configs;
import com.yupptv.ottsdk.rest.network.RestAdapter;
import com.yupptv.ottsdk.utils.OttLog;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;

public class ActionBottomSheetDialogFragment extends BottomSheetDialogFragment {
    private static String contentPath;
    private static DialogType dialogType;
    private static HashMap inputHashMap;
    private static Object mItemObject;
    public static BottomButtonsActionListener mListener;
    private static String packName;
    private static String subscriptionSource;
    private ExitPopupAdapter adapter;
    private LinearLayout ageRatingsLayout;
    private TextView ageRatingsText;
    private TextView alert_availablesoon_desc;
    private LinearLayout alert_availablesoon_desc_layout;
    public TextView alert_cast_title;
    public TextView alert_marker;
    private TextView availableLableTv;
    private TextView availableTv;
    private BottomTemplateInfo.TemplateInfo bottomDataModel;
    public LinearLayout bottomSheetLayout;
    public LinearLayout bottomSubscribeSheetRootLayout;
    private LinearLayout bottom_horizontal_LL_5;
    private JSONObject bottomtemplateInfo;
    private LinearLayout buttns_horizontal_LL_sub_2;
    private LinearLayout buttns_horizontal_linear_layout_1;
    private AppCompatButton button_secondepisode;
    private ImageView cancelDialogIcon;
    private ImageView cancelIcon;
    private AppCompatButton cocpButton;
    private ShapeableImageView cocpImageview;
    private TextView cocpSubtitleTv;
    private TextView cocpTitleTv;
    private TextView confirmCancelTv;
    private AppCompatButton confirmPopupButton;
    private TextView confirmPopupSubtitle;
    private TextView confirmPopupTitle;
    private CountDownTimer countDownTimer_redirect;
    private EditText couponEditText;
    private TextView currentPlanName;
    private TextView currentPlanNetworkCount;
    private TextView currentPlanSalesPrice;
    private TextView currentPlanTitle;
    public ImageView dialogCancelIcon;
    private ImageView dialog_cancel_icon_secondepisode;
    private Dialog dialog_deeplink_info;
    private TextView errorTextView;
    public Dialog exit_popup_popup;
    public ImageView imageView_close;
    public ImageView imageView_icon;
    public ImageView imdbIv;
    private LinearLayout imdbRatingsLayout;
    private TextView imdbRatingsText;
    public RelativeLayout inclusionRecyclerLL;
    private AppCompatButton jusPayButton;
    private AppCompatImageView jusPayCancelIcon;
    private ShapeableImageView jusPayImageview;
    private AppCompatTextView jusPaySubTitleTv;
    private AppCompatTextView jusPayTitleTv;
    private FragmentActivity mActivity;
    public BottomSheetBehavior mBottomBehavior;
    private BottomSheetDialog mBottomSheetDialog;
    public TextView mCastCrewTextView;
    public LinearLayout mCastLayout;
    public RadioButton mRadioButton;
    public ShapeableImageView mainImage;
    private ShapeableImageView main_imageview_secondepisode;
    private AppCompatButton noProButton;
    private ImageView noProCancelIcon;
    private ShapeableImageView noProImageview;
    private TextView noProSubtitleTv;
    private TextView noProTitleTv;
    public NestedScrollView overAllLayoutScrollView;
    public RecyclerView partnerIconsRecyclerView;
    public ImageView partner_icon;
    public TextView planNameTv;
    private Dialog postPaidBillingConfirmationDialog;
    private Button proUserCancelBtn;
    private Button proUserPopupButton;
    private Dialog proUserPopupDialog;
    private ImageView proUserPopupPosterImage;
    private RelativeLayout proUserPopupRoot;
    private TextView proUserPopupSubtitle;
    private TextView proUserPopupTitle;
    private LinearLayout radiogroup_vertical_LL_4;
    public RelativeLayout resumeBtnLayout;
    public TextView salesPriceTv;
    public TextView showExploreTv;
    public TextView showNetworkTv;
    public AppCompatButton subscribeButton;
    public TextView subtitleTv;
    private TextView subtitle_textview_secondepisode;
    private AppCompatButton suspendedButton;
    private ImageView suspendedCancelIcon;
    private ShapeableImageView suspendedImageview;
    private TextView suspendedSubtitleTv;
    private TextView suspendedTitleTv;
    private String target_watchNow;
    public TextView titleTv;
    private TextView title_textview_secondepisode;
    private ShapeableImageView upgradeMainImageView;
    private TextView upgradePlanName;
    private TextView upgradePlanNetworkCount;
    private TextView upgradePlanSalesPrice;
    private TextView upgradePlanTitle;
    private AppCompatButton upgradeSubscribeButton;
    private TextView upgradeSubtitleTv;
    private TextView upgradeTitleTv;
    private LinearLayout upgrade_vertical_LL_3;
    private boolean isfavorite = false;
    private User UserInfoData = null;
    private Integer auto_close_duration = -1;
    private long timeRemaining = 0;
    private boolean isTimerRunning = false;
    private boolean isAutoReDirection = false;
    public boolean pauseTrailer = false;
    private String sectionCode = "";
    private Section.SectionData pageData = null;
    public int maxlength = 8;
    private TextWatcher textWatcher = new TextWatcher() {
        @Override
        public void afterTextChanged(Editable editable) {
        }

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
            if (ActionBottomSheetDialogFragment.this.errorTextView.getVisibility() == 0) {
                ActionBottomSheetDialogFragment.this.couponEditText.setBackground(ActionBottomSheetDialogFragment.this.getResources().getDrawable(R.drawable.dotted_border));
                ActionBottomSheetDialogFragment.this.errorTextView.setVisibility(8);
            }
        }
    };
    public int networkId = 0;
    public String target_path = null;
    public boolean isTransactionDone = true;
    public final Handler handler = new Handler();
    public String orderId = "";
    public String navFrom = "";
    private long transactionStatusCheckDuration = 0;
    private long TIME_OUT_DURATION = 60000;
    private final Runnable transactionAction = new Runnable() {
        @Override
        public void run() {
            OttLog.error("sheet", "checking order status " + ActionBottomSheetDialogFragment.this.transactionStatusCheckDuration);
            if (ActionBottomSheetDialogFragment.this.getActivity() == null) {
                ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                actionBottomSheetDialogFragment.isTransactionDone = true;
                actionBottomSheetDialogFragment.handler.removeCallbacks(this);
                return;
            }
            ActionBottomSheetDialogFragment actionBottomSheetDialogFragment2 = ActionBottomSheetDialogFragment.this;
            if (!actionBottomSheetDialogFragment2.isTransactionDone && actionBottomSheetDialogFragment2.transactionStatusCheckDuration < ActionBottomSheetDialogFragment.this.TIME_OUT_DURATION) {
                ActionBottomSheetDialogFragment actionBottomSheetDialogFragment3 = ActionBottomSheetDialogFragment.this;
                actionBottomSheetDialogFragment3.getOrderStatus(actionBottomSheetDialogFragment3.orderId);
                ActionBottomSheetDialogFragment.this.transactionStatusCheckDuration += 10000;
                ActionBottomSheetDialogFragment.this.handler.postDelayed(this, 10000L);
                return;
            }
            ActionBottomSheetDialogFragment actionBottomSheetDialogFragment4 = ActionBottomSheetDialogFragment.this;
            actionBottomSheetDialogFragment4.isTransactionDone = false;
            actionBottomSheetDialogFragment4.handler.removeCallbacks(this);
            if (ActionBottomSheetDialogFragment.this.transactionStatusCheckDuration >= ActionBottomSheetDialogFragment.this.TIME_OUT_DURATION) {
                ActionBottomSheetDialogFragment actionBottomSheetDialogFragment5 = ActionBottomSheetDialogFragment.this;
                actionBottomSheetDialogFragment5.isTransactionDone = true;
                if (actionBottomSheetDialogFragment5.getActivity() != null) {
                    Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), R.string.payment_unsuccessful, 1).show();
                }
            }
        }
    };

    public class AnonymousClass19 implements MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo> {
        public final ImageView val$dialogCancelIcon;
        public final ShapeableImageView val$mainImage;
        public final RecyclerView val$partnerIconsRecyclerView;
        public final TextView val$planNameTv;
        public final TextView val$salesPriceTv;
        public final TextView val$showExploreTv;
        public final TextView val$showNetworkTv;
        public final AppCompatButton val$subscribeButton;
        public final TextView val$subtitleTv;
        public final TextView val$titleTv;

        public AnonymousClass19(TextView textView, TextView textView2, TextView textView3, TextView textView4, TextView textView5, TextView textView6, AppCompatButton appCompatButton, ImageView imageView, ShapeableImageView shapeableImageView, RecyclerView recyclerView) {
            this.val$titleTv = textView;
            this.val$subtitleTv = textView2;
            this.val$planNameTv = textView3;
            this.val$showExploreTv = textView4;
            this.val$salesPriceTv = textView5;
            this.val$showNetworkTv = textView6;
            this.val$subscribeButton = appCompatButton;
            this.val$dialogCancelIcon = imageView;
            this.val$mainImage = shapeableImageView;
            this.val$partnerIconsRecyclerView = recyclerView;
        }

        public void lambda$onSuccess$0(String str, String str2) {
            String str3;
            User a;
            if (OttSDK.getInstance() != null && OttSDK.getInstance().getPreferenceManager() != null && com.yupptv.ott.adapters.s.a() != null && (a = com.yupptv.ott.adapters.s.a()) != null && a.getUserCategory() != null) {
                if (a.getUserCategory().intValue() == 1) {
                    str3 = "prepaid pro subscription";
                } else if (a.getUserCategory().intValue() == 2) {
                    str3 = "postpaid pro subscription";
                } else if (a.getUserCategory().intValue() == 3) {
                    str3 = "non vi subscription";
                }
                ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str, str3, "popup displayed", "");
                CleverTap.moviesEventSubscriptionPageAppeared(str, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, str2);
            }
            str3 = "pro subscription";
            ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str, str3, "popup displayed", "");
            CleverTap.moviesEventSubscriptionPageAppeared(str, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, str2);
        }

        public void lambda$onSuccess$1(TextView textView, BottomTemplateInfo.TemplateInfo templateInfo, View view) {
            textView.getText().toString();
            if (ActionBottomSheetDialogFragment.this.getActivity() == null || !(ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                return;
            }
            ActionBottomSheetDialogFragment.this.getActivity().selectHomeOnPopFromWebView = true;
            ActionBottomSheetDialogFragment.this.getActivity().launchWebviewPlansPage(ActionBottomSheetDialogFragment.contentPath, templateInfo.getTarget_explore(), ActionBottomSheetDialogFragment.subscriptionSource);
        }

        public void lambda$onSuccess$2(AppCompatButton appCompatButton, String str, String str2, BottomTemplateInfo.TemplateInfo templateInfo, View view) {
            User a;
            ActionBottomSheetDialogFragment.this.pauseTrailer = true;
            OTTApplication.isTrailerPaused = false;
            String charSequence = appCompatButton.getText().toString();
            if (OttSDK.getInstance() != null && OttSDK.getInstance().getPreferenceManager() != null && com.yupptv.ott.adapters.s.a() != null && (a = com.yupptv.ott.adapters.s.a()) != null) {
                CleverTap.moviesEventSubscriptionPageClicked(str, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "button clicked", charSequence, str2);
                if (a.getUserCategory().intValue() == 1 || a.getUserCategory().intValue() == 3) {
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                } else {
                    CleverTap.moviesEventPostpaidPlansPopupAction(ActionBottomSheetDialogFragment.subscriptionSource, appCompatButton.getText().toString());
                }
            }
            if (templateInfo != null) {
                ActionBottomSheetDialogFragment.this.handlePrepaidPostPaidUserFlow(templateInfo);
            }
        }

        @Override
        public void onFailure(Error error) {
            if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(com.yupptv.ottsdk.model.BottomTemplateInfo r18) {
            throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.fragments.ActionBottomSheetDialogFragment.AnonymousClass19.onSuccess(com.yupptv.ottsdk.model.BottomTemplateInfo):void");
        }
    }

    public class AnonymousClass21 implements MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo> {
        public final AppCompatButton val$cocpButton;
        public final ShapeableImageView val$cocpImageview;
        public final TextView val$cocpSubtitleTv;
        public final TextView val$cocpTitleTv;

        public AnonymousClass21(TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
            this.val$cocpTitleTv = textView;
            this.val$cocpSubtitleTv = textView2;
            this.val$cocpImageview = shapeableImageView;
            this.val$cocpButton = appCompatButton;
        }

        public void lambda$onSuccess$0(String str, String str2, BottomTemplateInfo.TemplateInfo templateInfo, String str3) {
            ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str, str2, "popup displayed", "");
            CleverTap.moviesEventSubscriptionPageAppeared("cocp", ActionBottomSheetDialogFragment.subscriptionSource, templateInfo.getPlanName(), str3);
            CleverTap.moviesEventCocpPopupAppeared(ActionBottomSheetDialogFragment.subscriptionSource, "yes");
        }

        public void lambda$onSuccess$1(Animation animation) {
            ActionBottomSheetDialogFragment.this.bottomSheetLayout.setVisibility(0);
            ActionBottomSheetDialogFragment.this.bottomSheetLayout.startAnimation(animation);
        }

        @Override
        public void onFailure(Error error) {
            if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog = new BottomSheetDialog(ActionBottomSheetDialogFragment.this.getActivity(), R.style.CustomBottomSheetDialogTheme);
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow() != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow().clearFlags(2);
                    }
                }
            }
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
            final BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
            if (data != null) {
                final String replaceAll = TextUtils.isEmpty(data.getSalePrice()) ? "" : data.getSalePrice().replaceAll("[^0-9.]", "");
                final String str = "Cocp";
                final String str2 = "cocp";
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public final void run() {
                        ActionBottomSheetDialogFragment.AnonymousClass21.this.lambda$onSuccess$0(str, str2, data, replaceAll);
                    }
                }, 1000L);
                if (this.val$cocpTitleTv != null && data.getName() != null) {
                    this.val$cocpTitleTv.setText(data.getName());
                    if (data.getShowName() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$cocpTitleTv, data.getShowName().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$cocpSubtitleTv != null && data.getSubtitle() != null) {
                    this.val$cocpSubtitleTv.setText(data.getSubtitle());
                    if (data.getShowSubtitle() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$cocpSubtitleTv, data.getShowSubtitle().equalsIgnoreCase("true"));
                    }
                } else if (this.val$cocpSubtitleTv != null && data.getDescription() != null) {
                    this.val$cocpSubtitleTv.setText(data.getDescription());
                    if (data.getShowDescription() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$cocpSubtitleTv, data.getShowDescription().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$cocpImageview != null && data.getImage() != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    RequestBuilder load = Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), data.getImage()));
                    int i2 = R.drawable.default_poster;
                    load.placeholder(i2).error(i2).into(this.val$cocpImageview);
                    ActionBottomSheetDialogFragment.this.setImageRoundedCorner(this.val$cocpImageview);
                    if (data.getShowImage() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$cocpImageview, data.getShowImage().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$cocpButton != null && data.getButton() != null) {
                    this.val$cocpButton.setText(data.getButton());
                }
                MyRecoManager.getInstance().setPOPUP_NAME("Cocp");
                MyRecoManager.getInstance().setLABEL("cocp");
                MyRecoManager.getInstance().setBUTTON_LABEL(this.val$cocpButton.getText().toString());
                MyRecoManager.getInstance().setACTION("button clicked");
                this.val$cocpButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        CleverTap.moviesEventCocpPopupAction(ActionBottomSheetDialogFragment.subscriptionSource, AnonymousClass21.this.val$cocpButton.getText().toString());
                        CleverTap.moviesEventSubscriptionPageClicked("Cocp", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "button clicked", AnonymousClass21.this.val$cocpButton.getText().toString(), replaceAll);
                        if (data.getTarget_Logout() != null && data.getTarget_Logout().equalsIgnoreCase("logout")) {
                            ActionBottomSheetDialogFragment.this.logoutUserRedirectToSignin();
                        } else if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                            ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                        }
                    }
                });
                final Animation loadAnimation = AnimationUtils.loadAnimation(ActionBottomSheetDialogFragment.this.getActivity(), R.anim.slide_up);
                Window window = ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow();
                if (window != null) {
                    window.setWindowAnimations(0);
                    ActionBottomSheetDialogFragment.this.bottomSheetLayout.setVisibility(4);
                    window.getDecorView().post(new Runnable() {
                        @Override
                        public final void run() {
                            ActionBottomSheetDialogFragment.AnonymousClass21.this.lambda$onSuccess$1(loadAnimation);
                        }
                    });
                }
            }
        }
    }

    public class AnonymousClass22 implements MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo> {
        public final AppCompatButton val$Button;
        public final ShapeableImageView val$Imageview;
        public final TextView val$SubtitleTv;
        public final TextView val$TitleTv;
        public final String val$label;
        public final String val$popupName;

        public AnonymousClass22(String str, String str2, TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
            this.val$popupName = str;
            this.val$label = str2;
            this.val$TitleTv = textView;
            this.val$SubtitleTv = textView2;
            this.val$Imageview = shapeableImageView;
            this.val$Button = appCompatButton;
        }

        public static void lambda$onSuccess$0(String str, String str2, String str3) {
            MyRecoManager.getInstance().setPOPUP_NAME(str);
            MyRecoManager.getInstance().setLABEL(str2);
            MyRecoManager.getInstance().setBUTTON_LABEL("");
            MyRecoManager.getInstance().setACTION("popup displayed");
            CleverTap.moviesEventSubscriptionPageClicked(str, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "popup displayed", "", str3);
        }

        public void lambda$onSuccess$1(AppCompatButton appCompatButton, String str, String str2, BottomTemplateInfo.TemplateInfo templateInfo, View view) {
            CleverTap.moviesEventSubscriptionPageClicked(str, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "button clicked", appCompatButton.getText().toString(), str2);
            String target_button = !TextUtils.isEmpty(templateInfo.getTarget_button()) ? templateInfo.getTarget_button() : "";
            if (TextUtils.isEmpty(target_button) || !target_button.contains("http") || OTTApplication.getWebLinkCallback() == null) {
                if (ActionBottomSheetDialogFragment.this.getActivity() == null || !(ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                    return;
                }
                ActionBottomSheetDialogFragment.this.getActivity().launchWebviewPlansPage(ActionBottomSheetDialogFragment.contentPath, target_button, ActionBottomSheetDialogFragment.subscriptionSource);
                return;
            }
            OTTApplication.getWebLinkCallback().callWebLink(target_button);
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                ActionBottomSheetDialogFragment.this.getActivity().finish();
            }
        }

        @Override
        public void onFailure(Error error) {
            if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
            final BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
            if (data != null) {
                final String replaceAll = !TextUtils.isEmpty(data.getSalePrice()) ? data.getSalePrice().replaceAll("[^0-9.]", "") : "";
                Handler handler = new Handler();
                final String str = this.val$popupName;
                final String str2 = this.val$label;
                handler.postDelayed(new Runnable() {
                    @Override
                    public final void run() {
                        ActionBottomSheetDialogFragment.AnonymousClass22.lambda$onSuccess$0(str, str2, replaceAll);
                    }
                }, 1000L);
                if (this.val$TitleTv != null && data.getName() != null) {
                    this.val$TitleTv.setText(data.getName());
                    if (data.getShowName() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$TitleTv, data.getShowName().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$SubtitleTv != null && data.getDescription() != null) {
                    this.val$SubtitleTv.setText(data.getDescription());
                    if (data.getShowDescription() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$SubtitleTv, data.getShowDescription().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$Imageview != null && data.getImage() != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), data.getImage())).into(this.val$Imageview);
                    ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                    actionBottomSheetDialogFragment.setImageRoundedCorner(actionBottomSheetDialogFragment.main_imageview_secondepisode);
                    if (data.getShowImage() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$Imageview, data.getShowImage().equalsIgnoreCase("true"));
                    }
                }
                MyRecoManager.getInstance().setPOPUP_NAME(this.val$popupName);
                MyRecoManager.getInstance().setLABEL(this.val$label);
                MyRecoManager.getInstance().setBUTTON_LABEL(this.val$Button.getText().toString());
                MyRecoManager.getInstance().setACTION("button clicked");
                if (this.val$Button != null) {
                    if (data.getButton() != null) {
                        this.val$Button.setText(data.getButton());
                    }
                    final AppCompatButton appCompatButton = this.val$Button;
                    final String str3 = this.val$popupName;
                    appCompatButton.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public final void onClick(View view) {
                            ActionBottomSheetDialogFragment.AnonymousClass22.this.lambda$onSuccess$1(appCompatButton, str3, replaceAll, data, view);
                        }
                    });
                }
            }
        }
    }

    public class AnonymousClass23 implements MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo> {
        public final AppCompatButton val$suspendedButton;
        public final ShapeableImageView val$suspendedImageview;
        public final TextView val$suspendedSubtitleTv;
        public final TextView val$suspendedTitleTv;

        public AnonymousClass23(TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
            this.val$suspendedTitleTv = textView;
            this.val$suspendedSubtitleTv = textView2;
            this.val$suspendedImageview = shapeableImageView;
            this.val$suspendedButton = appCompatButton;
        }

        public void lambda$onSuccess$0(String str, String str2, BottomTemplateInfo.TemplateInfo templateInfo, String str3) {
            ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str, str2, "popup displayed", "");
            CleverTap.moviesEventSubscriptionPageAppeared("suspended", ActionBottomSheetDialogFragment.subscriptionSource, templateInfo.getPlanName(), str3);
            CleverTap.moviesEventSuspendedPopupAppeared(ActionBottomSheetDialogFragment.subscriptionSource, "yes");
        }

        public void lambda$onSuccess$1(AppCompatButton appCompatButton, String str, BottomTemplateInfo.TemplateInfo templateInfo, View view) {
            ActionBottomSheetDialogFragment.this.pauseTrailer = true;
            OTTApplication.isTrailerPaused = false;
            CleverTap.moviesEventSuspendedPopupAction(ActionBottomSheetDialogFragment.subscriptionSource, appCompatButton.getText().toString());
            CleverTap.moviesEventSubscriptionPageClicked("Suspended", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "button clicked", appCompatButton.getText().toString(), str);
            String target_rechargeSuspended = templateInfo.getTarget_rechargeSuspended() != null ? templateInfo.getTarget_rechargeSuspended() : templateInfo.getTarget_button() != null ? templateInfo.getTarget_button() : "";
            if (TextUtils.isEmpty(target_rechargeSuspended)) {
                if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                }
            } else if (templateInfo.getWebredirection() == null || !templateInfo.getWebredirection().equalsIgnoreCase("true") || ActionBottomSheetDialogFragment.this.getActivity() == null) {
                if (target_rechargeSuspended.contains("http") && OTTApplication.getWebLinkCallback() != null) {
                    OTTApplication.getWebLinkCallback().callWebLink(target_rechargeSuspended);
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        ActionBottomSheetDialogFragment.this.getActivity().finish();
                    }
                }
            } else if (templateInfo.getIsInternal() == null || !templateInfo.getIsInternal().equalsIgnoreCase("true")) {
                ActionBottomSheetDialogFragment.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(target_rechargeSuspended)));
            } else if (com.yupptv.ott.adapters.s.a() != null && (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                ActionBottomSheetDialogFragment.this.getActivity().launchWebviewPlansPage(ActionBottomSheetDialogFragment.contentPath, target_rechargeSuspended, ActionBottomSheetDialogFragment.subscriptionSource);
            }
            if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
        }

        public void lambda$onSuccess$2(Animation animation) {
            ActionBottomSheetDialogFragment.this.bottomSheetLayout.setVisibility(0);
            ActionBottomSheetDialogFragment.this.bottomSheetLayout.startAnimation(animation);
        }

        @Override
        public void onFailure(Error error) {
            if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog = new BottomSheetDialog(ActionBottomSheetDialogFragment.this.getActivity(), R.style.CustomBottomSheetDialogTheme);
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow() != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow().clearFlags(2);
                    }
                }
            }
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
            final BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
            if (data != null) {
                final String replaceAll = TextUtils.isEmpty(data.getSalePrice()) ? "" : data.getSalePrice().replaceAll("[^0-9.]", "");
                final String str = "Suspended";
                final String str2 = "suspended";
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public final void run() {
                        ActionBottomSheetDialogFragment.AnonymousClass23.this.lambda$onSuccess$0(str, str2, data, replaceAll);
                    }
                }, 1000L);
                if (this.val$suspendedTitleTv != null && data.getName() != null) {
                    this.val$suspendedTitleTv.setText(data.getName());
                    this.val$suspendedTitleTv.setTypeface(ResourcesCompat.getFont(this.val$suspendedTitleTv.getContext(), R.font.font_style_gotham_bold));
                    if (data.getShowName() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$suspendedTitleTv, data.getShowName().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$suspendedSubtitleTv != null && data.getSubtitle() != null) {
                    this.val$suspendedSubtitleTv.setText(data.getSubtitle());
                    if (data.getShowSubtitle() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$suspendedSubtitleTv, data.getShowSubtitle().equalsIgnoreCase("true"));
                    }
                } else if (this.val$suspendedSubtitleTv != null && data.getDescription() != null) {
                    this.val$suspendedSubtitleTv.setText(data.getDescription());
                    if (data.getShowDescription() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$suspendedSubtitleTv, data.getShowDescription().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$suspendedImageview != null && data.getImage() != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    RequestBuilder load = Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), data.getImage()));
                    int i2 = R.drawable.default_poster;
                    load.placeholder(i2).error(i2).into(this.val$suspendedImageview);
                    ActionBottomSheetDialogFragment.this.setImageRoundedCorner(this.val$suspendedImageview);
                    if (data.getShowImage() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$suspendedImageview, data.getShowImage().equalsIgnoreCase("true"));
                    }
                }
                if (this.val$suspendedButton != null && data.getButton() != null) {
                    this.val$suspendedButton.setText(data.getButton());
                    if (data.getShow_button() != null) {
                        ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$suspendedButton, data.getShow_button().equalsIgnoreCase("true"));
                    }
                }
                MyRecoManager.getInstance().setPOPUP_NAME("Suspended");
                MyRecoManager.getInstance().setLABEL("suspended");
                MyRecoManager.getInstance().setBUTTON_LABEL(this.val$suspendedButton.getText().toString());
                MyRecoManager.getInstance().setACTION("button clicked");
                final AppCompatButton appCompatButton = this.val$suspendedButton;
                appCompatButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public final void onClick(View view) {
                        ActionBottomSheetDialogFragment.AnonymousClass23.this.lambda$onSuccess$1(appCompatButton, replaceAll, data, view);
                    }
                });
                final Animation loadAnimation = AnimationUtils.loadAnimation(ActionBottomSheetDialogFragment.this.getActivity(), R.anim.slide_up);
                Window window = ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow();
                if (window != null) {
                    window.setWindowAnimations(0);
                    ActionBottomSheetDialogFragment.this.bottomSheetLayout.setVisibility(4);
                    window.getDecorView().post(new Runnable() {
                        @Override
                        public final void run() {
                            ActionBottomSheetDialogFragment.AnonymousClass23.this.lambda$onSuccess$2(loadAnimation);
                        }
                    });
                }
            }
        }
    }

    public class AnonymousClass24 implements MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo> {
        public final String val$label;
        public final AppCompatButton val$noProButton;
        public final ShapeableImageView val$noProImageview;
        public final TextView val$noProSubtitleTv;
        public final TextView val$noProTitleTv;
        public final String val$popupname;

        public AnonymousClass24(String str, String str2, TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
            this.val$popupname = str;
            this.val$label = str2;
            this.val$noProTitleTv = textView;
            this.val$noProSubtitleTv = textView2;
            this.val$noProImageview = shapeableImageView;
            this.val$noProButton = appCompatButton;
        }

        public void lambda$onSuccess$0(BottomTemplateInfo.TemplateInfo templateInfo, String str, String str2) {
            String unused = ActionBottomSheetDialogFragment.packName = templateInfo.getPlanName();
            ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str, str2, "popup displayed", "");
            CleverTap.moviesEventSubscriptionPageAppeared(str, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "");
        }

        public void lambda$onSuccess$1(Animation animation) {
            ActionBottomSheetDialogFragment.this.bottomSheetLayout.setVisibility(0);
            ActionBottomSheetDialogFragment.this.bottomSheetLayout.startAnimation(animation);
        }

        @Override
        public void onFailure(Error error) {
            if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog = new BottomSheetDialog(ActionBottomSheetDialogFragment.this.getActivity(), R.style.CustomBottomSheetDialogTheme);
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow() != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow().clearFlags(2);
                    }
                }
            }
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
            final BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
            if (data == null || ActionBottomSheetDialogFragment.this.getActivity() == null) {
                return;
            }
            Handler handler = new Handler();
            final String str = this.val$popupname;
            final String str2 = this.val$label;
            handler.postDelayed(new Runnable() {
                @Override
                public final void run() {
                    ActionBottomSheetDialogFragment.AnonymousClass24.this.lambda$onSuccess$0(data, str, str2);
                }
            }, 1000L);
            if (this.val$noProTitleTv != null && data.getName() != null) {
                this.val$noProTitleTv.setText(data.getName());
                if (data.getShowName() != null) {
                    ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$noProTitleTv, data.getShowName().equalsIgnoreCase("true"));
                }
            }
            if (this.val$noProSubtitleTv != null && data.getDescription() != null) {
                this.val$noProSubtitleTv.setText(data.getDescription());
                if (data.getShowDescription() != null) {
                    ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$noProSubtitleTv, data.getShowDescription().equalsIgnoreCase("true"));
                }
            }
            if (this.val$noProImageview != null && data.getImage() != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                RequestBuilder load = Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), data.getImage()));
                int i2 = R.drawable.default_poster;
                load.placeholder(i2).error(i2).into(this.val$noProImageview);
                ActionBottomSheetDialogFragment.this.setImageRoundedCorner(this.val$noProImageview);
                if (data.getShowImage() != null) {
                    ActionBottomSheetDialogFragment.this.setViewVisibility(this.val$noProImageview, data.getShowImage().equalsIgnoreCase("true"));
                }
            }
            if (this.val$noProButton != null) {
                if (data.getButton() != null) {
                    this.val$noProButton.setText(data.getButton());
                }
                this.val$noProButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        MyRecoManager.getInstance().setPOPUP_NAME(AnonymousClass24.this.val$popupname);
                        MyRecoManager.getInstance().setLABEL(AnonymousClass24.this.val$label);
                        MyRecoManager.getInstance().setBUTTON_LABEL(AnonymousClass24.this.val$noProButton.getText().toString());
                        MyRecoManager.getInstance().setACTION("button clicked");
                        CleverTap.moviesEventSubscriptionPageClicked(AnonymousClass24.this.val$popupname, ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "button clicked", AnonymousClass24.this.val$noProButton.getText().toString(), "");
                        BottomTemplateInfo.TemplateInfo templateInfo = data;
                        if (templateInfo != null) {
                            ActionBottomSheetDialogFragment.this.handlePrepaidPostPaidUserFlow(templateInfo);
                        }
                        if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                            ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                        }
                    }
                });
            }
            final Animation loadAnimation = AnimationUtils.loadAnimation(ActionBottomSheetDialogFragment.this.getActivity(), R.anim.slide_up);
            Window window = ActionBottomSheetDialogFragment.this.mBottomSheetDialog.getWindow();
            if (window != null) {
                window.setWindowAnimations(0);
                ActionBottomSheetDialogFragment.this.bottomSheetLayout.setVisibility(4);
                window.getDecorView().post(new Runnable() {
                    @Override
                    public final void run() {
                        ActionBottomSheetDialogFragment.AnonymousClass24.this.lambda$onSuccess$1(loadAnimation);
                    }
                });
            }
        }
    }

    public class AnonymousClass25 implements MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo> {
        public final Object val$mItemObject;
        public final Button val$proUserPopupButton;
        public final ImageView val$proUserPopupPosterImage;
        public final RelativeLayout val$proUserPopupRoot;
        public final TextView val$proUserPopupSubtitle;
        public final TextView val$proUserPopupTitle;

        public AnonymousClass25(Object obj, TextView textView, TextView textView2, ImageView imageView, RelativeLayout relativeLayout, Button button) {
            this.val$mItemObject = obj;
            this.val$proUserPopupTitle = textView;
            this.val$proUserPopupSubtitle = textView2;
            this.val$proUserPopupPosterImage = imageView;
            this.val$proUserPopupRoot = relativeLayout;
            this.val$proUserPopupButton = button;
        }

        public void lambda$onSuccess$0(Object obj, String str, String str2) {
            ActionBottomSheetDialogFragment.this.ctEventPopup(obj, str, str2, "popup displayed", "");
        }

        public void lambda$onSuccess$1(Button button, String str, String str2, Object obj, View view) {
            Card card;
            if (ActionBottomSheetDialogFragment.this.proUserPopupDialog != null) {
                String charSequence = button.getText().toString();
                if ((ActionBottomSheetDialogFragment.this.mActivity instanceof FusionViliteMainActivity) && ActionBottomSheetDialogFragment.this.mActivity.mPlayerFragment != null && ((ExoPlayerFragment) ActionBottomSheetDialogFragment.this.mActivity.mPlayerFragment).player != null && ((ExoPlayerFragment) ActionBottomSheetDialogFragment.this.mActivity.mPlayerFragment).player.getPlayWhenReady()) {
                    OTTApplication.isPlayerResume = true;
                }
                MyRecoManager.getInstance().setPOPUP_NAME(str);
                MyRecoManager.getInstance().setACTION("button clicked");
                MyRecoManager.getInstance().setBUTTON_LABEL(charSequence);
                MyRecoManager.getInstance().setLABEL(str2);
                NavigationUtils.eventCTAppInAppClick(ActionBottomSheetDialogFragment.this.getContext(), obj, (!(obj instanceof Card) || (card = (Card) obj) == null || card.getTarget() == null || TextUtils.isEmpty(card.getTarget().getPath())) ? "" : card.getTarget().getPath(), "", null);
            }
            ActionBottomSheetDialogFragment.this.proUserPopupDialog.dismiss();
            if (!Utils.isVimtvAppInstalledOrNot(ActionBottomSheetDialogFragment.this.getActivity(), "com.vodafone.vodafoneplay")) {
                if (APIUtils.getUtilAppConfigurations(ActionBottomSheetDialogFragment.this.getActivity()).getPaidUserBranchioLink() != null) {
                    ActionBottomSheetDialogFragment.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(APIUtils.getUtilAppConfigurations(ActionBottomSheetDialogFragment.this.getActivity()).getPaidUserBranchioLink())));
                    return;
                } else {
                    ActionBottomSheetDialogFragment.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=com.vodafone.vodafoneplay")));
                    return;
                }
            }
            if (APIUtils.getUtilAppConfigurations(ActionBottomSheetDialogFragment.this.getActivity()).getVimtvdeeplinkbaseurl() != null) {
                StringBuilder a = com.yupptv.ott.a.a(APIUtils.getUtilAppConfigurations(ActionBottomSheetDialogFragment.this.getActivity()).getVimtvdeeplinkbaseurl());
                a.append(ActionBottomSheetDialogFragment.this.target_path);
                ActionBottomSheetDialogFragment.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(a.toString())));
            }
        }

        @Override
        public void onFailure(Error error) {
            if (ActionBottomSheetDialogFragment.this.proUserPopupDialog != null) {
                ActionBottomSheetDialogFragment.this.proUserPopupDialog.dismiss();
            }
            if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
            BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
            if (data == null || ActionBottomSheetDialogFragment.this.getActivity() == null) {
                return;
            }
            if (!TextUtils.isEmpty(data.getTarget_auto_close_duration()) && Integer.parseInt(data.getTarget_auto_close_duration()) > 0) {
                ActionBottomSheetDialogFragment.this.auto_close_duration = Integer.valueOf(data.getTarget_auto_close_duration());
                ActionBottomSheetDialogFragment.this.startTimerWithInitialTime(Long.valueOf(r0.auto_close_duration.intValue()));
            }
            final String str = "pro user premium content click";
            final String str2 = Utils.isVimtvAppInstalledOrNot(ActionBottomSheetDialogFragment.this.getActivity(), "com.vodafone.vodafoneplay") ? "click to launch" : "click to install";
            if (!TextUtils.isEmpty(data.getClose())) {
                ActionBottomSheetDialogFragment.this.proUserCancelBtn.setText(data.getClose());
            }
            Handler handler = new Handler();
            final Object obj = this.val$mItemObject;
            handler.postDelayed(new Runnable() {
                @Override
                public final void run() {
                    ActionBottomSheetDialogFragment.AnonymousClass25.this.lambda$onSuccess$0(obj, str, str2);
                }
            }, 1000L);
            if (this.val$proUserPopupTitle != null && data.getName() != null) {
                this.val$proUserPopupTitle.setText(data.getName());
            }
            User loggedUser = APIUtils.getUtilPreferenceManager(ActionBottomSheetDialogFragment.this.getActivity()).getLoggedUser();
            if (loggedUser != null && loggedUser.getPhoneNumber() != null && this.val$proUserPopupSubtitle != null && data.getSubtitle() != null) {
                this.val$proUserPopupSubtitle.setText(data.getSubtitle().replace("$mobile$", loggedUser.getPhoneNumber()));
            }
            if (this.val$proUserPopupPosterImage != null && data.getImage() != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), data.getImage())).listener(new RequestListener<Drawable>() {
                    public boolean onLoadFailed(@Nullable GlideException glideException, Object obj2, Target<Drawable> target, boolean z) {
                        return false;
                    }

                    public boolean onResourceReady(Object obj2, Object obj3, Target target, DataSource dataSource, boolean z) {
                        return onResourceReady((Drawable) obj2, obj3, (Target<Drawable>) target, dataSource, z);
                    }

                    public boolean onResourceReady(Drawable drawable, Object obj2, Target<Drawable> target, DataSource dataSource, boolean z) {
                        AnonymousClass25.this.val$proUserPopupRoot.setVisibility(0);
                        return false;
                    }
                }).into(this.val$proUserPopupPosterImage);
            }
            if (this.val$proUserPopupButton != null && data.getWatchnow() != null) {
                this.val$proUserPopupButton.setText(data.getWatchnow());
            }
            final Button button = this.val$proUserPopupButton;
            final Object obj2 = this.val$mItemObject;
            button.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    ActionBottomSheetDialogFragment.AnonymousClass25.this.lambda$onSuccess$1(button, str, str2, obj2, view);
                }
            });
        }
    }

    public class AnonymousClass34 implements MediaCatalogManager.MediaCatalogCallback<FormData> {
        public final TextView val$alert_message;
        public final int val$btn_bg_selector;
        public final AppCompatTextView val$errorTitle;
        public final ImageView val$imageView_icon;
        public final LinearLayout.LayoutParams val$layoutParams;
        public final ContextThemeWrapper val$mWrapper;
        public final MediaCatalogManager val$mediaManager;
        public final LinearLayout val$player_horizontal_LL_1;
        public final LinearLayout val$player_horizontal_LL_2;
        public final ProgressBar val$progressBar;
        public final LinearLayout.LayoutParams val$radioLayoutParams;
        public final int val$radio_bg_selector;
        public final Resources val$resources;
        public final String val$target_path;

        public AnonymousClass34(Resources resources, LinearLayout.LayoutParams layoutParams, int i2, ContextThemeWrapper contextThemeWrapper, LinearLayout linearLayout, TextView textView, String str, LinearLayout.LayoutParams layoutParams2, int i3, ProgressBar progressBar, MediaCatalogManager mediaCatalogManager, LinearLayout linearLayout2, ImageView imageView, AppCompatTextView appCompatTextView) {
            this.val$resources = resources;
            this.val$layoutParams = layoutParams;
            this.val$btn_bg_selector = i2;
            this.val$mWrapper = contextThemeWrapper;
            this.val$player_horizontal_LL_1 = linearLayout;
            this.val$alert_message = textView;
            this.val$target_path = str;
            this.val$radioLayoutParams = layoutParams2;
            this.val$radio_bg_selector = i3;
            this.val$progressBar = progressBar;
            this.val$mediaManager = mediaCatalogManager;
            this.val$player_horizontal_LL_2 = linearLayout2;
            this.val$imageView_icon = imageView;
            this.val$errorTitle = appCompatTextView;
        }

        @Override
        public void onFailure(Error error) {
            AppCompatTextView appCompatTextView = this.val$errorTitle;
            if (appCompatTextView != null) {
                appCompatTextView.setText(error.getMessage());
                this.val$errorTitle.setVisibility(0);
            }
            ProgressBar progressBar = this.val$progressBar;
            if (progressBar != null) {
                ActionBottomSheetDialogFragment.this.hidShowProgress(false, progressBar);
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/form", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(FormData formData) {
            int size;
            if (ActionBottomSheetDialogFragment.this.getActivity() == null) {
                return;
            }
            List<FormData.FormElement> elements = formData.getElements();
            if (elements != null && (size = elements.size()) > 0) {
                final RecordModel[] recordModelArr = new RecordModel[1];
                RadioGroup radioGroup = new RadioGroup(ActionBottomSheetDialogFragment.this.getActivity());
                radioGroup.setOrientation(0);
                int i2 = -1;
                int i3 = -1;
                for (int i4 = 0; i4 < size; i4++) {
                    FormData.FormElement formElement = elements.get(i4);
                    String fieldType = formElement.getFieldType();
                    if (fieldType.equalsIgnoreCase("cancel")) {
                        i2++;
                        View appCompatButton = ActionBottomSheetDialogFragment.this.getAppCompatButton(this.val$resources.getString(R.string.action_cancel), "", i2, this.val$layoutParams, this.val$btn_bg_selector, this.val$mWrapper);
                        appCompatButton.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                ActionBottomSheetDialogFragment.this.dismiss();
                            }
                        });
                        this.val$player_horizontal_LL_1.addView(appCompatButton, i2);
                    } else if (fieldType.equalsIgnoreCase("label")) {
                        this.val$alert_message.setText(formElement.getData());
                        this.val$alert_message.setVisibility(0);
                    } else if (fieldType.equalsIgnoreCase("button")) {
                        i2++;
                        View appCompatButton2 = ActionBottomSheetDialogFragment.this.getAppCompatButton(formElement.getData(), formElement.getElementCode(), i2, this.val$layoutParams, this.val$btn_bg_selector, this.val$mWrapper);
                        appCompatButton2.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                String str = (String) view.getTag();
                                if (str.equalsIgnoreCase("")) {
                                    return;
                                }
                                if (str.equalsIgnoreCase("subscribe")) {
                                    BottomButtonsActionListener bottomButtonsActionListener = ActionBottomSheetDialogFragment.mListener;
                                    if (bottomButtonsActionListener != null) {
                                        bottomButtonsActionListener.onButtonClicked(null, null, ButtonType.SUBSCRIBE);
                                    }
                                    ActionBottomSheetDialogFragment.this.dismiss();
                                    return;
                                }
                                if (str.equalsIgnoreCase("upgrade")) {
                                    BottomButtonsActionListener bottomButtonsActionListener2 = ActionBottomSheetDialogFragment.mListener;
                                    if (bottomButtonsActionListener2 != null) {
                                        bottomButtonsActionListener2.onButtonClicked(null, null, ButtonType.UPGRADE);
                                    }
                                    ActionBottomSheetDialogFragment.this.dismiss();
                                }
                            }
                        });
                        this.val$player_horizontal_LL_1.addView(appCompatButton2, i2);
                    } else if (fieldType.equalsIgnoreCase("radio-button")) {
                        i3++;
                        RecordModel recordModel = new RecordModel();
                        recordModel.setTitle(formElement.getData());
                        recordModel.setElementCode(formElement.getElementCode());
                        recordModel.setValue(formElement.getValue());
                        recordModel.setCode(formElement.getFormCode());
                        recordModel.setTargetPath(this.val$target_path);
                        recordModel.setId(i3);
                        RadioButton appCompatRadioButton = ActionBottomSheetDialogFragment.this.getAppCompatRadioButton(recordModel, this.val$radioLayoutParams, this.val$radio_bg_selector, new ContextThemeWrapper(ActionBottomSheetDialogFragment.this.getActivity(), R.style.style_action_radio_button), ActionBottomSheetDialogFragment.this.getActivity(), this.val$resources);
                        if (i3 == 0) {
                            recordModelArr[0] = recordModel;
                        }
                        RadioGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams(-2, (int) this.val$resources.getDimension(R.dimen.margin_default_40));
                        layoutParams.setMargins(0, 0, (int) this.val$resources.getDimension(R.dimen.card_spacing), 0);
                        radioGroup.addView(appCompatRadioButton, i3, layoutParams);
                        appCompatRadioButton.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                recordModelArr[0] = (RecordModel) view.getTag();
                            }
                        });
                    } else if (fieldType.equalsIgnoreCase("submit")) {
                        i2++;
                        final View appCompatButton3 = ActionBottomSheetDialogFragment.this.getAppCompatButton(formElement.getData(), formElement.getElementCode(), i2, this.val$layoutParams, this.val$btn_bg_selector, this.val$mWrapper);
                        appCompatButton3.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                RecordModel recordModel2 = recordModelArr[0];
                                if (recordModel2 == null) {
                                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                                        Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) "Somthing went wrong!!", 0).show();
                                    }
                                } else {
                                    AnonymousClass34 anonymousClass34 = AnonymousClass34.this;
                                    ActionBottomSheetDialogFragment.this.hidShowProgress(true, anonymousClass34.val$progressBar);
                                    RestAdapter.enableCache(false);
                                    final String value = recordModel2.getValue();
                                    AnonymousClass34.this.val$mediaManager.submitFormData(recordModel2.getCode(), recordModel2.getTargetPath(), recordModel2.getElementCode(), value, new MediaCatalogManager.MediaCatalogCallback<String>() {
                                        @Override
                                        public void onFailure(Error error) {
                                            AnonymousClass34 anonymousClass342 = AnonymousClass34.this;
                                            ProgressBar progressBar = anonymousClass342.val$progressBar;
                                            if (progressBar != null) {
                                                ActionBottomSheetDialogFragment.this.hidShowProgress(false, progressBar);
                                            }
                                            if (error != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                                                a.a(error, ActionBottomSheetDialogFragment.this.getActivity(), 0);
                                            }
                                            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/form/submit", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                                        }

                                        @Override
                                        public void onSuccess(String str) {
                                            AnonymousClass34 anonymousClass342 = AnonymousClass34.this;
                                            ActionBottomSheetDialogFragment.this.hidShowProgress(false, anonymousClass342.val$progressBar);
                                            if (str == null || ActionBottomSheetDialogFragment.this.getActivity() == null) {
                                                return;
                                            }
                                            Preferences instance = Preferences.instance(ActionBottomSheetDialogFragment.this.getActivity());
                                            Boolean bool = Boolean.TRUE;
                                            instance.setBooleanPreference("pref_key_tv_guide_refresh", bool);
                                            instance.setBooleanPreference("pref_key_player_start_record", bool);
                                            String str2 = value;
                                            if (str2 != null && !str2.equalsIgnoreCase("") && value.contains(":")) {
                                                String str3 = value.split(":")[r1.length - 1];
                                                if (str3 == null || str3.equalsIgnoreCase("") || !str3.equalsIgnoreCase("series")) {
                                                    instance.setBooleanPreference("pref_key_tv_guide_series", Boolean.FALSE);
                                                } else {
                                                    instance.setBooleanPreference("pref_key_tv_guide_series", bool);
                                                }
                                            }
                                            instance.setStringPreference("pref_key_tv_guide_record_action", "start");
                                            BottomButtonsActionListener bottomButtonsActionListener = ActionBottomSheetDialogFragment.mListener;
                                            if (bottomButtonsActionListener != null) {
                                                bottomButtonsActionListener.onButtonClicked(appCompatButton3, null, ButtonType.RECORD);
                                            }
                                            ActionBottomSheetDialogFragment.this.dismiss();
                                        }
                                    });
                                }
                            }
                        });
                        this.val$player_horizontal_LL_1.addView(appCompatButton3, i2);
                    }
                }
                if (i2 >= 0) {
                    this.val$player_horizontal_LL_2.setVisibility(0);
                    this.val$player_horizontal_LL_1.setVisibility(0);
                }
                if (i3 >= 0) {
                    this.val$player_horizontal_LL_1.setVisibility(0);
                    this.val$player_horizontal_LL_2.setVisibility(0);
                    ((RadioButton) radioGroup.getChildAt(0)).setChecked(true);
                    this.val$player_horizontal_LL_2.addView(radioGroup, 0);
                }
                this.val$imageView_icon.setVisibility(8);
            }
            ActionBottomSheetDialogFragment.this.hidShowProgress(false, this.val$progressBar);
        }
    }

    public class AnonymousClass35 implements MediaCatalogManager.MediaCatalogCallback<FormData> {
        public final TextView val$alert_message;
        public final TextView val$alert_subTitle;
        public final TextView val$alert_subTitle1;
        public final TextView val$alert_subTitle2;
        public final TextView val$alert_sub_message;
        public final LinearLayout val$bottom_horizontal_LL_5;
        public final AppCompatButton val$btn;
        public final int val$btn_bg_selector;
        public final LinearLayout val$buttnsHorizontalLinearLayout_1;
        public final LinearLayout val$buttns_horizontal_LL_sub_2;
        public final AppCompatTextView val$errorTitle;
        public final String val$finalTarget_path;
        public final ImageView val$imageView_icon;
        public final String val$key_code;
        public final LinearLayout.LayoutParams val$layoutParams;
        public final ContextThemeWrapper val$mWrapper;
        public final MediaCatalogManager val$mediaManager;
        public final String val$navigation_fragment;
        public final ImageView val$partner_icon;
        public final ProgressBar val$progressBar;
        public final LinearLayout.LayoutParams val$radioLayoutParams;
        public final int val$radio_bg_selector;
        public final LinearLayout val$radiogroup_vertical_LL_4;
        public final Resources val$resources;
        public final LinearLayout.LayoutParams val$subLayoutParams;
        public final LinearLayout val$upgrade_vertical_LL_3;

        public class AnonymousClass4 implements View.OnClickListener {
            public final RecordModel[] val$selectedRecordModel;

            public AnonymousClass4(RecordModel[] recordModelArr) {
                this.val$selectedRecordModel = recordModelArr;
            }

            @Override
            public void onClick(View view) {
                final RecordModel recordModel = this.val$selectedRecordModel[0];
                if (recordModel == null) {
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) "Somthing went wrong!!", 0).show();
                    }
                } else {
                    AnonymousClass35 anonymousClass35 = AnonymousClass35.this;
                    ActionBottomSheetDialogFragment.this.hidShowProgress(true, anonymousClass35.val$progressBar);
                    RestAdapter.enableCache(false);
                    final String value = recordModel.getValue();
                    AnonymousClass35.this.val$mediaManager.submitFormData(recordModel.getCode(), recordModel.getTargetPath(), recordModel.getElementCode(), value, new MediaCatalogManager.MediaCatalogCallback<String>() {
                        @Override
                        public void onFailure(Error error) {
                            AnonymousClass35 anonymousClass352 = AnonymousClass35.this;
                            ProgressBar progressBar = anonymousClass352.val$progressBar;
                            if (progressBar != null) {
                                ActionBottomSheetDialogFragment.this.hidShowProgress(false, progressBar);
                            }
                            if (error != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                                a.a(error, ActionBottomSheetDialogFragment.this.getActivity(), 0);
                            }
                            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/form/submit", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                        }

                        @Override
                        public void onSuccess(String str) {
                            ActionBottomSheetDialogFragment.this.hideSecondBottomLayout();
                            AnonymousClass35 anonymousClass352 = AnonymousClass35.this;
                            ActionBottomSheetDialogFragment.this.hidShowProgress(false, anonymousClass352.val$progressBar);
                            if (str != null) {
                                if (recordModel.getCode().equalsIgnoreCase("favourite_form") || recordModel.getCode().equalsIgnoreCase("remove_favourite_form")) {
                                    ActionBottomSheetDialogFragment.this.getContentPage(recordModel);
                                }
                                Preferences instance = Preferences.instance(ActionBottomSheetDialogFragment.this.getActivity());
                                if (!AnonymousClass35.this.val$navigation_fragment.equalsIgnoreCase("navigation_tv_guide")) {
                                    String str2 = value;
                                    if (str2 != null && !str2.equalsIgnoreCase("") && value.contains(":")) {
                                        String[] split = value.split(":");
                                        String str3 = split[split.length - 1];
                                        String str4 = split[1];
                                        if (str4.startsWith("0") || str4.startsWith("3") || str4.startsWith("4")) {
                                            if (ActionBottomSheetDialogFragment.this.getActivity() != null && (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity) && ActionBottomSheetDialogFragment.this.getActivity().isCurrentRecordingFragment()) {
                                                ActionBottomSheetDialogFragment.this.dismiss();
                                                return;
                                            } else {
                                                RestAdapter.enableCache(false);
                                                AnonymousClass35 anonymousClass353 = AnonymousClass35.this;
                                                anonymousClass353.val$mediaManager.getBottomTemplateInfo(anonymousClass353.val$key_code, anonymousClass353.val$finalTarget_path, new MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo>() {
                                                    @Override
                                                    public void onFailure(Error error) {
                                                        NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                                                    }

                                                    @Override
                                                    public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
                                                    }
                                                });
                                            }
                                        }
                                    }
                                    AnonymousClass35.this.val$buttnsHorizontalLinearLayout_1.removeAllViewsInLayout();
                                    AnonymousClass35.this.val$upgrade_vertical_LL_3.removeAllViewsInLayout();
                                    AnonymousClass35.this.val$buttns_horizontal_LL_sub_2.removeAllViewsInLayout();
                                    AnonymousClass35.this.val$bottom_horizontal_LL_5.removeAllViewsInLayout();
                                    AnonymousClass35.this.val$radiogroup_vertical_LL_4.removeAllViewsInLayout();
                                    AnonymousClass35 anonymousClass354 = AnonymousClass35.this;
                                    ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                                    TextView textView = anonymousClass354.val$alert_message;
                                    TextView textView2 = anonymousClass354.val$alert_sub_message;
                                    TextView textView3 = actionBottomSheetDialogFragment.alert_availablesoon_desc;
                                    AnonymousClass35 anonymousClass355 = AnonymousClass35.this;
                                    actionBottomSheetDialogFragment.drawDialog(textView, textView2, textView3, anonymousClass355.val$imageView_icon, anonymousClass355.val$partner_icon, anonymousClass355.val$buttnsHorizontalLinearLayout_1, anonymousClass355.val$buttns_horizontal_LL_sub_2, anonymousClass355.val$upgrade_vertical_LL_3, anonymousClass355.val$radiogroup_vertical_LL_4, anonymousClass355.val$bottom_horizontal_LL_5, anonymousClass355.val$progressBar, anonymousClass355.val$alert_subTitle, anonymousClass355.val$alert_subTitle1, anonymousClass355.val$alert_subTitle2, anonymousClass355.val$errorTitle, null, null, null, null, null, null, null);
                                    return;
                                }
                                Boolean bool = Boolean.TRUE;
                                instance.setBooleanPreference("pref_key_tv_guide_refresh", bool);
                                String str5 = value;
                                if (str5 != null && !str5.equalsIgnoreCase("") && value.contains(":")) {
                                    String[] split2 = value.split(":");
                                    String str6 = split2[split2.length - 1];
                                    if (str6 == null || str6.equalsIgnoreCase("") || !str6.equalsIgnoreCase("series")) {
                                        instance.setBooleanPreference("pref_key_tv_guide_series", Boolean.FALSE);
                                    } else {
                                        instance.setBooleanPreference("pref_key_tv_guide_series", bool);
                                    }
                                    final String str7 = split2[1];
                                    if (!str7.startsWith("0") && !str7.startsWith("3") && !str7.startsWith("4")) {
                                        instance.setStringPreference("pref_key_tv_guide_record_action", "start");
                                    } else {
                                        if (ActionBottomSheetDialogFragment.this.getActivity() != null && (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity) && ActionBottomSheetDialogFragment.this.getActivity().isCurrentRecordingFragment()) {
                                            BottomButtonsActionListener bottomButtonsActionListener = ActionBottomSheetDialogFragment.mListener;
                                            if (bottomButtonsActionListener != null) {
                                                AnonymousClass35 anonymousClass356 = AnonymousClass35.this;
                                                bottomButtonsActionListener.onButtonClicked(anonymousClass356.val$btn, null, ActionBottomSheetDialogFragment.this.getActivity().isBottomBarVisible() ? ButtonType.DELETE_RECORD : ButtonType.DELETE_RECORD_FROM_VIEWALL);
                                            }
                                            ActionBottomSheetDialogFragment.this.dismiss();
                                            return;
                                        }
                                        instance.setStringPreference("pref_key_tv_guide_record_action", "stop");
                                        RestAdapter.enableCache(false);
                                        AnonymousClass35 anonymousClass357 = AnonymousClass35.this;
                                        anonymousClass357.val$mediaManager.getBottomTemplateInfo(anonymousClass357.val$key_code, anonymousClass357.val$finalTarget_path, new MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo>() {
                                            @Override
                                            public void onFailure(Error error) {
                                                NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                                            }

                                            @Override
                                            public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
                                                if (ActionBottomSheetDialogFragment.mListener != null && (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                                                    BottomButtonsActionListener bottomButtonsActionListener2 = ActionBottomSheetDialogFragment.mListener;
                                                    AnonymousClass35 anonymousClass358 = AnonymousClass35.this;
                                                    bottomButtonsActionListener2.onButtonClicked(anonymousClass358.val$btn, null, ActionBottomSheetDialogFragment.this.getActivity().isBottomBarVisible() ? ButtonType.DELETE_RECORD : ButtonType.DELETE_RECORD_FROM_VIEWALL);
                                                }
                                                if (str7.startsWith("0")) {
                                                    return;
                                                }
                                                ActionBottomSheetDialogFragment.this.dismiss();
                                            }
                                        });
                                    }
                                }
                                instance.setStringPreference("pref_key_tv_guide_record", value);
                                AnonymousClass35.this.val$buttnsHorizontalLinearLayout_1.removeAllViewsInLayout();
                                AnonymousClass35.this.val$upgrade_vertical_LL_3.removeAllViewsInLayout();
                                AnonymousClass35.this.val$buttns_horizontal_LL_sub_2.removeAllViewsInLayout();
                                AnonymousClass35.this.val$bottom_horizontal_LL_5.removeAllViewsInLayout();
                                AnonymousClass35.this.val$radiogroup_vertical_LL_4.removeAllViewsInLayout();
                                AnonymousClass35 anonymousClass358 = AnonymousClass35.this;
                                ActionBottomSheetDialogFragment actionBottomSheetDialogFragment2 = ActionBottomSheetDialogFragment.this;
                                TextView textView4 = anonymousClass358.val$alert_message;
                                TextView textView5 = anonymousClass358.val$alert_sub_message;
                                TextView textView6 = actionBottomSheetDialogFragment2.alert_availablesoon_desc;
                                AnonymousClass35 anonymousClass359 = AnonymousClass35.this;
                                actionBottomSheetDialogFragment2.drawDialog(textView4, textView5, textView6, anonymousClass359.val$imageView_icon, anonymousClass359.val$partner_icon, anonymousClass359.val$buttnsHorizontalLinearLayout_1, anonymousClass359.val$buttns_horizontal_LL_sub_2, anonymousClass359.val$upgrade_vertical_LL_3, anonymousClass359.val$radiogroup_vertical_LL_4, anonymousClass359.val$bottom_horizontal_LL_5, anonymousClass359.val$progressBar, anonymousClass359.val$alert_subTitle, anonymousClass359.val$alert_subTitle1, anonymousClass359.val$alert_subTitle2, anonymousClass359.val$errorTitle, null, null, null, null, null, null, null);
                            }
                        }
                    });
                }
            }
        }

        public AnonymousClass35(LinearLayout linearLayout, LinearLayout linearLayout2, LinearLayout linearLayout3, Resources resources, LinearLayout.LayoutParams layoutParams, int i2, ContextThemeWrapper contextThemeWrapper, LinearLayout.LayoutParams layoutParams2, AppCompatButton appCompatButton, String str, LinearLayout.LayoutParams layoutParams3, int i3, ProgressBar progressBar, MediaCatalogManager mediaCatalogManager, String str2, String str3, LinearLayout linearLayout4, LinearLayout linearLayout5, TextView textView, TextView textView2, ImageView imageView, ImageView imageView2, TextView textView3, TextView textView4, TextView textView5, AppCompatTextView appCompatTextView) {
            this.val$bottom_horizontal_LL_5 = linearLayout;
            this.val$radiogroup_vertical_LL_4 = linearLayout2;
            this.val$upgrade_vertical_LL_3 = linearLayout3;
            this.val$resources = resources;
            this.val$layoutParams = layoutParams;
            this.val$btn_bg_selector = i2;
            this.val$mWrapper = contextThemeWrapper;
            this.val$subLayoutParams = layoutParams2;
            this.val$btn = appCompatButton;
            this.val$finalTarget_path = str;
            this.val$radioLayoutParams = layoutParams3;
            this.val$radio_bg_selector = i3;
            this.val$progressBar = progressBar;
            this.val$mediaManager = mediaCatalogManager;
            this.val$navigation_fragment = str2;
            this.val$key_code = str3;
            this.val$buttnsHorizontalLinearLayout_1 = linearLayout4;
            this.val$buttns_horizontal_LL_sub_2 = linearLayout5;
            this.val$alert_message = textView;
            this.val$alert_sub_message = textView2;
            this.val$imageView_icon = imageView;
            this.val$partner_icon = imageView2;
            this.val$alert_subTitle = textView3;
            this.val$alert_subTitle1 = textView4;
            this.val$alert_subTitle2 = textView5;
            this.val$errorTitle = appCompatTextView;
        }

        @Override
        public void onFailure(Error error) {
            ProgressBar progressBar = this.val$progressBar;
            if (progressBar != null) {
                ActionBottomSheetDialogFragment.this.hidShowProgress(false, progressBar);
            }
            NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/form", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
        }

        @Override
        public void onSuccess(FormData formData) {
            boolean z;
            int size;
            List<FormData.FormElement> elements = formData.getElements();
            if (ActionBottomSheetDialogFragment.this.getActivity() == null || elements == null || (size = elements.size()) <= 0) {
                z = false;
            } else {
                final RecordModel[] recordModelArr = new RecordModel[1];
                RadioGroup radioGroup = new RadioGroup(ActionBottomSheetDialogFragment.this.getActivity());
                radioGroup.setOrientation(1);
                radioGroup.setGravity(17);
                this.val$bottom_horizontal_LL_5.removeAllViewsInLayout();
                this.val$radiogroup_vertical_LL_4.removeAllViewsInLayout();
                this.val$upgrade_vertical_LL_3.removeAllViewsInLayout();
                int i2 = -1;
                int i3 = -1;
                int i4 = -1;
                for (int i5 = 0; i5 < size; i5++) {
                    FormData.FormElement formElement = elements.get(i5);
                    String fieldType = formElement.getFieldType();
                    if (fieldType.equalsIgnoreCase("cancel")) {
                        i3++;
                        View appCompatButton = ActionBottomSheetDialogFragment.this.getAppCompatButton(this.val$resources.getString(R.string.action_cancel), "", i3, this.val$layoutParams, this.val$btn_bg_selector, this.val$mWrapper);
                        appCompatButton.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                ActionBottomSheetDialogFragment.this.hideSecondBottomLayout();
                            }
                        });
                        this.val$bottom_horizontal_LL_5.addView(appCompatButton, i3);
                    } else if (fieldType.equalsIgnoreCase("title")) {
                        i2++;
                        this.val$upgrade_vertical_LL_3.addView(ActionBottomSheetDialogFragment.this.getAppCompatTextView(formElement.getData(), i2, this.val$subLayoutParams, new ContextThemeWrapper(ActionBottomSheetDialogFragment.this.getActivity(), R.style.style_rendering_text_title), true), i2);
                    } else if (fieldType.equalsIgnoreCase("label")) {
                        i2++;
                        this.val$upgrade_vertical_LL_3.addView(ActionBottomSheetDialogFragment.this.getAppCompatTextView(formElement.getData(), i2, this.val$subLayoutParams, new ContextThemeWrapper(ActionBottomSheetDialogFragment.this.getActivity(), R.style.style_rendering_text_description), false), i2);
                    } else if (fieldType.equalsIgnoreCase("button")) {
                        i3++;
                        View appCompatButton2 = ActionBottomSheetDialogFragment.this.getAppCompatButton(formElement.getData(), formElement.getElementCode(), i3, this.val$layoutParams, this.val$btn_bg_selector, this.val$mWrapper);
                        appCompatButton2.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                String str = (String) view.getTag();
                                if (str.equalsIgnoreCase("")) {
                                    return;
                                }
                                if (str.equalsIgnoreCase("subscribe")) {
                                    ActionBottomSheetDialogFragment.this.hideSecondBottomLayout();
                                    BottomButtonsActionListener bottomButtonsActionListener = ActionBottomSheetDialogFragment.mListener;
                                    if (bottomButtonsActionListener != null) {
                                        bottomButtonsActionListener.onButtonClicked(AnonymousClass35.this.val$btn, null, ButtonType.SUBSCRIBE);
                                    }
                                    ActionBottomSheetDialogFragment.this.dismiss();
                                    return;
                                }
                                if (str.equalsIgnoreCase("upgrade")) {
                                    ActionBottomSheetDialogFragment.this.hideSecondBottomLayout();
                                    BottomButtonsActionListener bottomButtonsActionListener2 = ActionBottomSheetDialogFragment.mListener;
                                    if (bottomButtonsActionListener2 != null) {
                                        bottomButtonsActionListener2.onButtonClicked(AnonymousClass35.this.val$btn, null, ButtonType.UPGRADE);
                                    }
                                    ActionBottomSheetDialogFragment.this.dismiss();
                                }
                            }
                        });
                        this.val$bottom_horizontal_LL_5.addView(appCompatButton2, i3);
                    } else {
                        if (fieldType.equalsIgnoreCase("radio-button")) {
                            i4++;
                            RecordModel recordModel = new RecordModel();
                            recordModel.setTitle(formElement.getData());
                            recordModel.setElementCode(formElement.getElementCode());
                            recordModel.setValue(formElement.getValue());
                            recordModel.setCode(formElement.getFormCode());
                            recordModel.setTargetPath(this.val$finalTarget_path);
                            recordModel.setId(i4);
                            View appCompatRadioButton = ActionBottomSheetDialogFragment.this.getAppCompatRadioButton(recordModel, this.val$radioLayoutParams, this.val$radio_bg_selector, new ContextThemeWrapper(ActionBottomSheetDialogFragment.this.getActivity(), R.style.style_action_radio_button), ActionBottomSheetDialogFragment.this.getActivity(), this.val$resources);
                            if (i4 == 0) {
                                recordModelArr[0] = recordModel;
                            }
                            RadioGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams(-1, (int) this.val$resources.getDimension(R.dimen.margin_default_40));
                            Resources resources = this.val$resources;
                            int i6 = R.dimen.card_images_marginStart;
                            layoutParams.setMargins(0, (int) resources.getDimension(i6), 0, (int) this.val$resources.getDimension(i6));
                            radioGroup.addView(appCompatRadioButton, i4, layoutParams);
                            appCompatRadioButton.setOnClickListener(new View.OnClickListener() {
                                @Override
                                public void onClick(View view) {
                                    RecordModel recordModel2 = (RecordModel) view.getTag();
                                    recordModelArr[0] = recordModel2;
                                    CustomLog.e("TAG", "onClick" + recordModel2.getValue());
                                }
                            });
                        } else if (fieldType.equalsIgnoreCase("submit")) {
                            i3++;
                            View appCompatButton3 = ActionBottomSheetDialogFragment.this.getAppCompatButton(formElement.getData(), formElement.getElementCode(), i3, this.val$layoutParams, this.val$btn_bg_selector, this.val$mWrapper);
                            appCompatButton3.setOnClickListener(new AnonymousClass4(recordModelArr));
                            this.val$bottom_horizontal_LL_5.addView(appCompatButton3, i3);
                        }
                    }
                }
                if (i2 >= 0) {
                    z = false;
                    this.val$upgrade_vertical_LL_3.setVisibility(0);
                    this.val$buttnsHorizontalLinearLayout_1.setVisibility(0);
                    this.val$alert_sub_message.setVisibility(0);
                    this.val$alert_message.setVisibility(0);
                    this.val$alert_subTitle.setVisibility(0);
                    this.val$imageView_icon.setVisibility(0);
                } else {
                    z = false;
                }
                if (i3 >= 0) {
                    this.val$bottom_horizontal_LL_5.setVisibility(z ? 1 : 0);
                    this.val$buttnsHorizontalLinearLayout_1.setVisibility(z ? 1 : 0);
                    this.val$alert_sub_message.setVisibility(z ? 1 : 0);
                    this.val$alert_message.setVisibility(z ? 1 : 0);
                    this.val$alert_subTitle.setVisibility(z ? 1 : 0);
                    this.val$imageView_icon.setVisibility(z ? 1 : 0);
                }
                if (i4 >= 0) {
                    this.val$radiogroup_vertical_LL_4.setVisibility(z ? 1 : 0);
                    this.val$buttnsHorizontalLinearLayout_1.setVisibility(z ? 1 : 0);
                    this.val$alert_sub_message.setVisibility(z ? 1 : 0);
                    this.val$alert_message.setVisibility(z ? 1 : 0);
                    this.val$alert_subTitle.setVisibility(z ? 1 : 0);
                    this.val$imageView_icon.setVisibility(z ? 1 : 0);
                    ((RadioButton) radioGroup.getChildAt(z ? 1 : 0)).setChecked(true);
                    this.val$radiogroup_vertical_LL_4.addView(radioGroup, z ? 1 : 0);
                }
            }
            ActionBottomSheetDialogFragment.this.hidShowProgress(z, this.val$progressBar);
        }
    }

    public static class AnonymousClass37 {
        public static final int[] $SwitchMap$com$yupptv$ott$enums$DialogType;

        static {
            int[] iArr = new int[DialogType.values().length];
            $SwitchMap$com$yupptv$ott$enums$DialogType = iArr;
            try {
                iArr[DialogType.DIALOG_PLAYER_BOTTOM_RENDERING.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.DIALOG_BOTTOM_RENDERING.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.DIALOG_VOUCHER_BOTTOM_RENDERING.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.SUBSCRIBE_SHEET_DIALOG.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.UPGRADE_SHEET_DIALOG.ordinal()] = 5;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.USER_COCP_SHEET_DIALOG.ordinal()] = 6;
            } catch (NoSuchFieldError unused6) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.USER_SUSPENDED_SHEET_DIALOG.ordinal()] = 7;
            } catch (NoSuchFieldError unused7) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.NO_PRO_USER_SHEET_DIALOG.ordinal()] = 8;
            } catch (NoSuchFieldError unused8) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.PRO_USER_POPUP_DIALOG.ordinal()] = 9;
            } catch (NoSuchFieldError unused9) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.LSDK_SECONDEPISODE_OVERLAY.ordinal()] = 10;
            } catch (NoSuchFieldError unused10) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.DEEPLINK_INFO.ordinal()] = 11;
            } catch (NoSuchFieldError unused11) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.EXIT_POPUP.ordinal()] = 12;
            } catch (NoSuchFieldError unused12) {
            }
            try {
                $SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.CHANGE_UPI_JUSPAY_CALL_DIALOG.ordinal()] = 13;
            } catch (NoSuchFieldError unused13) {
            }
        }
    }

    public class SubscriptionPartnerIconsListAdapter extends RecyclerView.Adapter<SubscriptionPartnerIconsListHolder> {
        public final MediaCatalogManager[] mediaManager = {OttSDK.getInstance().getMediaManager()};
        private List<String> partnerIconList;

        public class SubscriptionPartnerIconsListHolder extends RecyclerView.ViewHolder {
            private ShapeableImageView subscriptionPartnerIcon;

            public SubscriptionPartnerIconsListHolder(@NonNull View view) {
                super(view);
                this.subscriptionPartnerIcon = view.findViewById(R.id.subscription_partner_icon_image);
            }
        }

        public SubscriptionPartnerIconsListAdapter(List<String> list) {
            this.partnerIconList = list;
        }

        public int getItemCount() {
            return this.partnerIconList.size();
        }

        public void onBindViewHolder(@NonNull SubscriptionPartnerIconsListHolder subscriptionPartnerIconsListHolder, int i2) {
            if (ActionBottomSheetDialogFragment.this.getActivity() == null || TextUtils.isEmpty(this.partnerIconList.get(i2)) || this.mediaManager[0] == null) {
                return;
            }
            Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), this.partnerIconList.get(i2))).into(subscriptionPartnerIconsListHolder.subscriptionPartnerIcon);
        }

        @NonNull
        public SubscriptionPartnerIconsListHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i2) {
            if (ActionBottomSheetDialogFragment.this.getActivity() == null) {
                return null;
            }
            return new SubscriptionPartnerIconsListHolder(LayoutInflater.from(ActionBottomSheetDialogFragment.this.getActivity()).inflate(R.layout.subscription_partner_logo_item, viewGroup, false));
        }
    }

    private Dialog changeUpiJuspayCallPopup() {
        if (this.mActivity == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(this.mActivity, R.style.NoBackgroundDialogTheme);
        this.mBottomSheetDialog.setContentView(LayoutInflater.from(this.mActivity).inflate(R.layout.bottom_change_upi_juspay_call_sheet, (ViewGroup) this.mActivity.getWindow().getDecorView().getRootView(), false));
        this.mBottomSheetDialog.setCanceledOnTouchOutside(false);
        LinearLayout linearLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.bottom_change_upi_sheet_root);
        this.bottomSheetLayout = linearLayout;
        linearLayout.setVisibility(8);
        this.jusPayTitleTv = this.mBottomSheetDialog.findViewById(R.id.change_upi_title_textview);
        this.jusPaySubTitleTv = this.mBottomSheetDialog.findViewById(R.id.change_upi_subtitle_textview);
        this.jusPayImageview = this.mBottomSheetDialog.findViewById(R.id.change_upi_main_imageview);
        this.jusPayCancelIcon = this.mBottomSheetDialog.findViewById(R.id.change_upi_dialog_cancel_icon);
        this.jusPayButton = this.mBottomSheetDialog.findViewById(R.id.change_upi_button);
        HashMap hashMap = inputHashMap;
        if (hashMap != null) {
            if (hashMap.containsKey(Constants.DIALOG_TITLE)) {
                this.jusPayTitleTv.setText((CharSequence) inputHashMap.get(Constants.DIALOG_TITLE));
                this.jusPayTitleTv.setVisibility(0);
            }
            if (inputHashMap.containsKey(Constants.DIALOG_SUBTITLE)) {
                this.jusPaySubTitleTv.setText((CharSequence) inputHashMap.get(Constants.DIALOG_SUBTITLE));
                this.jusPaySubTitleTv.setVisibility(0);
            }
            if (inputHashMap.containsKey(Constants.DIALOG_BUTTON_LABEL1)) {
                this.jusPayButton.setText((CharSequence) inputHashMap.get(Constants.DIALOG_BUTTON_LABEL1));
                this.jusPayButton.setVisibility(0);
            }
            this.jusPayImageview.setImageDrawable(this.mActivity.getResources().getDrawable(R.drawable.autopay_pause));
            if (inputHashMap.containsKey(Constants.CLOSE_ENABLED) && inputHashMap.get(Constants.CLOSE_ENABLED).equals("true")) {
                this.jusPayCancelIcon.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        CleverTap.moviesEventSubscriptionPageClicked("Change UPI Error", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "", "closed", "");
                        ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, "Change UPI Error", "Cancel", "popup closed", "closed");
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                        if (ActionBottomSheetDialogFragment.this.mActivity instanceof MoviesWebViewActivity) {
                            ActionBottomSheetDialogFragment.this.mActivity.finish();
                        }
                    }
                });
            } else {
                this.jusPayCancelIcon.setVisibility(8);
            }
            this.jusPayButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    String charSequence = ActionBottomSheetDialogFragment.this.jusPayButton.getText().toString();
                    CleverTap.moviesEventSubscriptionPageClicked("Change UPI Error", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "", "closed", "");
                    ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, "Change UPI Error", charSequence, "popup closed", "closed");
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                    if (ActionBottomSheetDialogFragment.this.mActivity instanceof MoviesWebViewActivity) {
                        ActionBottomSheetDialogFragment.this.mActivity.finish();
                    }
                }
            });
        }
        final Animation loadAnimation = AnimationUtils.loadAnimation(this.mActivity, R.anim.slide_up);
        Window window = this.mBottomSheetDialog.getWindow();
        if (window != null) {
            window.setWindowAnimations(0);
            this.bottomSheetLayout.setVisibility(4);
            window.getDecorView().post(new Runnable() {
                @Override
                public final void run() {
                    ActionBottomSheetDialogFragment.this.lambda$changeUpiJuspayCallPopup$0(loadAnimation);
                }
            });
        }
        return this.mBottomSheetDialog;
    }

    private void createDeepLinkInfoDialog(final ImageView imageView, String str, String str2, final RelativeLayout relativeLayout, final TextView textView, final TextView textView2, final AppCompatButton appCompatButton, final AppCompatButton appCompatButton2) {
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str, str2, new MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo>() {
                @Override
                public void onFailure(Error error) {
                    if (ActionBottomSheetDialogFragment.this.dialog_deeplink_info != null) {
                        ActionBottomSheetDialogFragment.this.dialog_deeplink_info.dismiss();
                    }
                    NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                }

                @Override
                public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
                    final BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
                    if (data != null) {
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null && (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                            ActionBottomSheetDialogFragment.this.getActivity().stopOrStartPlayer(true);
                        }
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, "hotstar app redirection popup", "redirection consent", "popup displayed", "");
                            String image = !TextUtils.isEmpty(data.getImage()) ? data.getImage() : "";
                            if (ActionBottomSheetDialogFragment.this.getActivity() != null && !ActionBottomSheetDialogFragment.this.getActivity().isFinishing()) {
                                Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), image)).error(ActionBottomSheetDialogFragment.this.getActivity().getDrawable(R.drawable.square_circle_placeholder)).into(imageView);
                            }
                            relativeLayout.setVisibility(0);
                        }
                        if (textView != null && !TextUtils.isEmpty(data.getName())) {
                            textView.setText(data.getName());
                        }
                        User loggedUser = APIUtils.getUtilPreferenceManager(ActionBottomSheetDialogFragment.this.getActivity()).getLoggedUser();
                        if (loggedUser != null && loggedUser.getPhoneNumber() != null && textView2 != null && !TextUtils.isEmpty(data.getSubtitle())) {
                            textView2.setText(data.getSubtitle().replace("$mobile$", loggedUser.getPhoneNumber()));
                        }
                        ActionBottomSheetDialogFragment.this.target_watchNow = data.getTargetWatchnow();
                        if (!TextUtils.isEmpty(data.getTarget_auto_close_duration()) && Integer.parseInt(data.getTarget_auto_close_duration()) > 0) {
                            ActionBottomSheetDialogFragment.this.auto_close_duration = Integer.valueOf(data.getTarget_auto_close_duration());
                            ActionBottomSheetDialogFragment.this.startTimerWithInitialTime(Long.valueOf(r0.auto_close_duration.intValue()));
                        }
                        ActionBottomSheetDialogFragment.this.dialog_deeplink_info.setCancelable(false);
                        if (appCompatButton != null && !TextUtils.isEmpty(data.getWatchnow())) {
                            appCompatButton.setText(data.getWatchnow());
                            appCompatButton.setOnClickListener(new View.OnClickListener() {
                                @Override
                                public void onClick(View view) {
                                    ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, "hotstar app redirection popup", "redirection consent", "button clicked", data.getWatchnow() != null ? data.getWatchnow() : null);
                                    ActionBottomSheetDialogFragment.this.stopTimer_redirect();
                                    ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                                    actionBottomSheetDialogFragment.fetchDeepLinkInfo(actionBottomSheetDialogFragment.target_watchNow, ActionBottomSheetDialogFragment.this.target_watchNow);
                                    ActionBottomSheetDialogFragment.this.dialog_deeplink_info.dismiss();
                                }
                            });
                        }
                        if (appCompatButton2 == null || TextUtils.isEmpty(data.getClose())) {
                            return;
                        }
                        appCompatButton2.setText(data.getClose());
                        appCompatButton2.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, "hotstar app redirection popup", "redirection consent", "button clicked", data.getClose() != null ? data.getClose() : null);
                                ActionBottomSheetDialogFragment.this.stopTimer_redirect();
                                ActionBottomSheetDialogFragment.this.dialog_deeplink_info.dismiss();
                                if (ActionBottomSheetDialogFragment.this.getActivity() == null || !(ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                                    return;
                                }
                                ActionBottomSheetDialogFragment.this.getActivity().stopOrStartPlayer(false);
                            }
                        });
                    }
                }
            });
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createExitDialog(TextView textView, TextView textView2, TextView textView3, final AppCompatButton appCompatButton, final AppCompatButton appCompatButton2, RecyclerView recyclerView, String str, String str2) {
        if (OTTApplication.exitPopupApiCalled && OTTApplication.popupObject != null && OTTApplication.pageData != null) {
            JSONObject jSONObject = (JSONObject) OTTApplication.popupObject;
            this.bottomtemplateInfo = jSONObject;
            this.pageData = (Section.SectionData) OTTApplication.pageData;
            loadPopupData(jSONObject, textView, textView2, textView3, appCompatButton, appCompatButton2);
            recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), 0, false));
            ExitPopupAdapter exitPopupAdapter = new ExitPopupAdapter(this, getActivity(), this.pageData);
            this.adapter = exitPopupAdapter;
            recyclerView.setAdapter(exitPopupAdapter);
        }
        appCompatButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (ActionBottomSheetDialogFragment.this.getActivity() == null || !(ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                    return;
                }
                ActionBottomSheetDialogFragment.this.getActivity().showBottomBar(false);
                if (ActionBottomSheetDialogFragment.this.getActivity() != null && ActionBottomSheetDialogFragment.this.pageData != null) {
                    NavigationUtils.performHeaderNavigation("explore_more", ActionBottomSheetDialogFragment.this.getActivity(), PageType.Content, ActionBottomSheetDialogFragment.this.pageData);
                }
                MyRecoManager.getInstance().setTRACKING_ID(ActionBottomSheetDialogFragment.this.pageData.getMyRecoTrackingId());
                CleverTap.moviesEventExitPopup(Constants.VALUE_CLICKED, appCompatButton.getText().toString(), "", "", "", ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity ? ActionBottomSheetDialogFragment.this.getActivity().bottomTabSelected : "", "", -1, "", "", "");
                ActionBottomSheetDialogFragment.this.dismiss();
            }
        });
        appCompatButton2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                APIUtils.getOTTSdkInstance(ActionBottomSheetDialogFragment.this.getActivity()).cancelAllRequests();
                if (ActionBottomSheetDialogFragment.this.getActivity() == null || !(ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity)) {
                    return;
                }
                CleverTap.moviesEventExitPopup(Constants.VALUE_CLICKED, appCompatButton2.getText().toString(), "", "", "", ActionBottomSheetDialogFragment.this.getActivity().bottomTabSelected, "", -1, "", "", "");
                ActionBottomSheetDialogFragment.this.getActivity().backToExit = true;
                ActionBottomSheetDialogFragment.this.getActivity().exitButtonClicked = true;
                ActionBottomSheetDialogFragment.this.getActivity().onBackPressed();
            }
        });
    }

    private void createLsdkSecondepisodeDialog(String str, String str2, TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
        HashMap hashMap = inputHashMap;
        String str3 = "";
        String str4 = null;
        if (hashMap != null) {
            str4 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            if (inputHashMap.containsKey("dialog_template_code")) {
                str3 = (String) inputHashMap.get("dialog_template_code");
            }
        } else {
            str3 = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str3, str4, new AnonymousClass22(str, str2, textView, textView2, shapeableImageView, appCompatButton));
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createNoProUserSheetDialog(String str, String str2, TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
        HashMap hashMap = inputHashMap;
        String str3 = "";
        String str4 = null;
        if (hashMap != null) {
            str4 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            if (inputHashMap.containsKey("dialog_template_code")) {
                str3 = (String) inputHashMap.get("dialog_template_code");
            }
        } else {
            str3 = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str3, str4, new AnonymousClass24(str, str2, textView, textView2, shapeableImageView, appCompatButton));
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createProUserPopupDialog(TextView textView, TextView textView2, ImageView imageView, Button button, RelativeLayout relativeLayout, Object obj) {
        String str;
        this.target_path = "";
        HashMap hashMap = inputHashMap;
        if (hashMap != null) {
            if (hashMap.containsKey("dialog_key_target_path")) {
                this.target_path = (String) inputHashMap.get("dialog_key_target_path");
            } else {
                this.target_path = "";
            }
            str = inputHashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            if (inputHashMap.containsKey("navigation_fragment")) {
            }
            if (inputHashMap.containsKey(Constants.DIALOG_KEY_IMAGE_URL_PATH)) {
            }
        } else {
            str = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str, this.target_path, new AnonymousClass25(obj, textView, textView2, imageView, relativeLayout, button));
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createSubscribeSheetDialog(TextView textView, TextView textView2, TextView textView3, TextView textView4, TextView textView5, TextView textView6, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton, RelativeLayout relativeLayout, RecyclerView recyclerView, LinearLayout linearLayout, ImageView imageView) {
        String str;
        HashMap hashMap = inputHashMap;
        String str2 = null;
        if (hashMap != null) {
            String str3 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            String str4 = inputHashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            if (inputHashMap.containsKey("navigation_fragment")) {
            }
            if (inputHashMap.containsKey(Constants.DIALOG_KEY_IMAGE_URL_PATH)) {
            }
            String str5 = str3;
            str2 = str4;
            str = str5;
        } else {
            str = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {APIUtils.getmMediaManager(getActivity())};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str2, str, new AnonymousClass19(textView, textView2, textView3, textView4, textView5, textView6, appCompatButton, imageView, shapeableImageView, recyclerView));
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createUpgradeSheetDialog(final TextView textView, final TextView textView2, final ShapeableImageView shapeableImageView, final AppCompatButton appCompatButton, final TextView textView3, final TextView textView4, final TextView textView5, final TextView textView6, TextView textView7, final TextView textView8, final TextView textView9, final TextView textView10) {
        String str;
        HashMap hashMap = inputHashMap;
        String str2 = null;
        if (hashMap != null) {
            String str3 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            String str4 = inputHashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            if (inputHashMap.containsKey("navigation_fragment")) {
            }
            if (inputHashMap.containsKey(Constants.DIALOG_KEY_IMAGE_URL_PATH)) {
            }
            String str5 = str3;
            str2 = str4;
            str = str5;
        } else {
            str = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str2, str, new MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo>() {
                @Override
                public void onFailure(Error error) {
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                    }
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) error.getMessage().toString(), 0).show();
                    }
                    NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                }

                @Override
                public void onSuccess(BottomTemplateInfo bottomTemplateInfo) {
                    final BottomTemplateInfo.TemplateInfo data = bottomTemplateInfo.getData();
                    if (data != null) {
                        if (textView != null && data.getName() != null) {
                            textView.setText(data.getName());
                            if (data.getShowName() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView, data.getShowName().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView2 != null && data.getSubtitle() != null) {
                            textView2.setText(data.getSubtitle());
                            if (data.getShowSubtitle() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView2, data.getShowSubtitle().equalsIgnoreCase("true"));
                            }
                        }
                        if (shapeableImageView != null && data.getImage() != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            Glide.with(ActionBottomSheetDialogFragment.this.getActivity().getApplicationContext()).load(APIUtils.getAbsoluteImagePath(ActionBottomSheetDialogFragment.this.getActivity(), data.getImage())).into(shapeableImageView);
                            ActionBottomSheetDialogFragment.this.setImageRoundedCorner(shapeableImageView);
                        }
                        if (appCompatButton != null && data.getSubscribe() != null) {
                            appCompatButton.setText(data.getSubscribe());
                            if (data.getShow_subscribe() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(appCompatButton, data.getShow_subscribe().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView3 != null && data.getCurrentPlanBlockTitle() != null) {
                            textView3.setText(data.getCurrentPlanBlockTitle());
                            if (data.getShow_currentPlanBlockTitle() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView3, data.getShow_currentPlanBlockTitle().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView4 != null && data.getCurrentPlanName() != null) {
                            textView4.setText(data.getCurrentPlanName());
                            if (data.getShow_currentPlanName() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView4, data.getShow_currentPlanName().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView5 != null && data.getCurrentPlanNetworksCount() != null) {
                            textView5.setText(data.getCurrentPlanNetworksCount());
                            if (data.getShow_currentPlanNetworksCount() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView5, data.getShow_currentPlanNetworksCount().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView6 != null && data.getCurrentPlanSalePrice() != null) {
                            textView6.setText(data.getCurrentPlanSalePrice());
                            if (data.getShow_currentPlanSalePrice() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView6, data.getShow_currentPlanSalePrice().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView8 != null && data.getPremiumPlanName() != null) {
                            textView8.setText(data.getPremiumPlanName());
                            if (data.getShow_premiumPlanName() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView8, data.getShow_premiumPlanName().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView9 != null && data.getPremiumPlanNetworksCount() != null) {
                            textView9.setText(data.getPremiumPlanNetworksCount());
                            if (data.getShow_premiumPlanNetworksCount() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView9, data.getShow_premiumPlanNetworksCount().equalsIgnoreCase("true"));
                            }
                        }
                        if (textView10 != null && data.getPremiumPlanSalePrice() != null) {
                            textView10.setText(data.getPremiumPlanSalePrice());
                            if (data.getShow_premiumPlanSalePrice() != null) {
                                ActionBottomSheetDialogFragment.this.setViewVisibility(textView10, data.getShow_premiumPlanSalePrice().equalsIgnoreCase("true"));
                            }
                        }
                        final String str6 = "upgrade subscription";
                        final String str7 = "Subscription Upgrade";
                        appCompatButton.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str6, str7, "button clicked", appCompatButton.getText().toString());
                                BottomTemplateInfo.TemplateInfo templateInfo = data;
                                if (templateInfo != null) {
                                    ActionBottomSheetDialogFragment.this.handlePrepaidPostPaidUserFlow(templateInfo);
                                }
                            }
                        });
                    }
                }
            });
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createUserCocpSheetDialog(TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
        String str;
        HashMap hashMap = inputHashMap;
        String str2 = null;
        if (hashMap != null) {
            String str3 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            String str4 = inputHashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            if (inputHashMap.containsKey("navigation_fragment")) {
            }
            if (inputHashMap.containsKey(Constants.DIALOG_KEY_IMAGE_URL_PATH)) {
            }
            String str5 = str3;
            str2 = str4;
            str = str5;
        } else {
            str = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str2, str, new AnonymousClass21(textView, textView2, shapeableImageView, appCompatButton));
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    private void createUserSuspendedSheetDialog(TextView textView, TextView textView2, ShapeableImageView shapeableImageView, AppCompatButton appCompatButton) {
        String str;
        HashMap hashMap = inputHashMap;
        String str2 = null;
        if (hashMap != null) {
            String str3 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            String str4 = inputHashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            if (inputHashMap.containsKey("navigation_fragment")) {
            }
            if (inputHashMap.containsKey(Constants.DIALOG_KEY_IMAGE_URL_PATH)) {
            }
            String str5 = str3;
            str2 = str4;
            str = str5;
        } else {
            str = null;
        }
        try {
            MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            mediaCatalogManagerArr[0].getBottomTemplateInfo(str2, str, new AnonymousClass23(textView, textView2, shapeableImageView, appCompatButton));
        } catch (Exception e2) {
            if (getActivity() != null) {
                Toast.makeText((Context) getActivity(), (CharSequence) ("Error message : " + e2.getMessage().toString()), 0).show();
            }
        }
    }

    public void ctEventPopup(Object obj, String str, String str2, String str3, String str4) {
        String str5;
        int i2;
        int i3;
        String str6;
        String str7;
        String str8;
        String str9;
        String str10;
        String str11;
        String str12;
        String str13;
        String str14;
        String str15;
        String str16;
        String str17;
        String str18;
        String str19 = "na";
        if (obj != null && (obj instanceof ContentPage)) {
            String contentTitle = MyRecoManager.getInstance().getContentTitle();
            String contentLanguage = MyRecoManager.getInstance().getContentLanguage();
            String contentPartnerName = MyRecoManager.getInstance().getContentPartnerName();
            String contentType = MyRecoManager.getInstance().getContentType();
            String contentModel = MyRecoManager.getInstance().getContentModel();
            String contentId = MyRecoManager.getInstance().getContentId();
            String contentTvShowName = MyRecoManager.getInstance().getContentTvShowName();
            str5 = "content watch now";
            str8 = contentLanguage;
            str13 = contentPartnerName;
            str12 = contentType;
            str10 = "na";
            str11 = contentTitle;
            str9 = contentModel;
            str14 = contentId;
            str15 = contentTvShowName;
            i3 = MyRecoManager.getInstance().getContentPosition();
            i2 = MyRecoManager.getInstance().getCarouselPosition();
            str6 = MyRecoManager.getInstance().getSourceDetailsForAnalytics();
            str7 = MyRecoManager.getInstance().getCarouselTitle();
        } else if (obj instanceof Card) {
            str5 = MyRecoManager.getInstance().getSourceForAnalytics();
            String sourceDetailsForAnalytics = MyRecoManager.getInstance().getSourceDetailsForAnalytics();
            Card card = (Card) obj;
            String contentTitle2 = MyRecoManager.getInstance().getContentTitle();
            String language = card.getTarget().getPageAttributes().getLanguage();
            int carouselPosition = MyRecoManager.getInstance().getCarouselPosition();
            String networkName = card.getTarget().getPageAttributes().getNetworkName();
            String id = card.getTarget().getPageAttributes().getId();
            String tvShowName = card.getTarget().getPageAttributes().getTvShowName();
            if (card.getTarget() == null || card.getTarget().getPageAttributes() == null) {
                str16 = "na";
                str17 = networkName;
                str18 = "";
            } else {
                String a = com.yupptv.ott.adapters.l.a(card);
                String mediaContentType = (a == null || !(a.equalsIgnoreCase(Constants.CONTENT_TYPE_LIVE) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_LIVE_TV) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_EPG) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_CHANNEL))) ? card.getTarget().getPageAttributes().getMediaContentType() : Constants.CONTENT_TYPE_LIVE;
                if (isPreviewContent(card)) {
                    networkName = Constants.VALUE_YVS.toString();
                    mediaContentType = Constants.CONTENT_TYPE_PREVIEW;
                }
                String a2 = com.yupptv.ott.adapters.j.a(card);
                str16 = com.yupptv.ott.adapters.k.a(card);
                str17 = networkName;
                str18 = mediaContentType;
                str19 = a2;
            }
            str10 = str16;
            i3 = -1;
            str7 = null;
            str9 = str19;
            str13 = str17;
            str6 = sourceDetailsForAnalytics;
            str11 = contentTitle2;
            str8 = language;
            i2 = carouselPosition;
            str12 = str18;
            str14 = id;
            str15 = tvShowName;
        } else {
            str5 = subscriptionSource;
            i2 = -1;
            i3 = -1;
            str6 = null;
            str7 = null;
            str8 = "na";
            str9 = str8;
            str10 = str9;
            str11 = "";
            str12 = str11;
            str13 = str12;
            str14 = str13;
            str15 = str14;
        }
        CleverTap.moviesEventPopUp(MyRecoManager.getInstance().getPROMOTIONAL_VIEW(), str, str3, str2, str4, str11, str12, str8, str13, str14, str5, str6, (getActivity() == null || !(getActivity() instanceof FusionViliteMainActivity)) ? "Home" : getActivity().bottomTabSelected, str15, str9, i2, i3, str7, str10);
    }

    public void deeplinkRedirection() {
        Card card;
        Fragment fragment;
        if (getActivity() != null) {
            OTTApplication.isDrawerOpen = false;
            FusionViliteMainActivity fusionViliteMainActivity = this.mActivity;
            if ((fusionViliteMainActivity instanceof FusionViliteMainActivity) && (fragment = fusionViliteMainActivity.mPlayerFragment) != null && ((ExoPlayerFragment) fragment).player != null && ((ExoPlayerFragment) fragment).player.getPlayWhenReady()) {
                OTTApplication.isPlayerResume = true;
            }
            boolean isVimtvAppInstalledOrNot = Utils.isVimtvAppInstalledOrNot(getActivity(), "com.vodafone.vodafoneplay");
            if (this.proUserPopupDialog != null) {
                Object obj = mItemObject;
                NavigationUtils.eventCTAppInAppClick(getContext(), mItemObject, (!(obj instanceof Card) || (card = (Card) obj) == null || card.getTarget() == null || TextUtils.isEmpty(card.getTarget().getPath())) ? "" : card.getTarget().getPath(), "", null);
            }
            if (isVimtvAppInstalledOrNot) {
                if (getActivity() != null && APIUtils.getUtilAppConfigurations(getActivity()).getVimtvdeeplinkbaseurl() != null) {
                    StringBuilder a = com.yupptv.ott.a.a(APIUtils.getUtilAppConfigurations(getActivity()).getVimtvdeeplinkbaseurl());
                    a.append(this.target_path);
                    startActivity(new Intent("android.intent.action.VIEW", Uri.parse(a.toString())));
                }
            } else if (APIUtils.getUtilAppConfigurations(getActivity()).getPaidUserBranchioLink() != null) {
                startActivity(new Intent("android.intent.action.VIEW", Uri.parse(APIUtils.getUtilAppConfigurations(getActivity()).getPaidUserBranchioLink())));
            } else {
                startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=com.vodafone.vodafoneplay")));
            }
        }
        this.proUserPopupDialog.dismiss();
    }

    public void drawDialog(final TextView textView, final TextView textView2, final TextView textView3, final ImageView imageView, final ImageView imageView2, final LinearLayout linearLayout, final LinearLayout linearLayout2, final LinearLayout linearLayout3, final LinearLayout linearLayout4, final LinearLayout linearLayout5, final ProgressBar progressBar, final TextView textView4, final TextView textView5, final TextView textView6, final AppCompatTextView appCompatTextView, final LinearLayout linearLayout6, final LinearLayout linearLayout7, final ImageView imageView3, final ImageView imageView4, final TextView textView7, final TextView textView8, final View view) {
        final String str;
        String str2;
        final String str3;
        ActionBottomSheetDialogFragment actionBottomSheetDialogFragment;
        ProgressBar progressBar2;
        boolean z;
        HashMap hashMap = inputHashMap;
        if (hashMap != null) {
            String str4 = hashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
            String str5 = inputHashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            String str6 = inputHashMap.containsKey("navigation_fragment") ? (String) inputHashMap.get("navigation_fragment") : "";
            if (inputHashMap.containsKey(Constants.DIALOG_KEY_IMAGE_URL_PATH)) {
            }
            str2 = str4;
            str = str5;
            str3 = str6;
        } else {
            str = null;
            str2 = null;
            str3 = null;
        }
        final BottomDataModel[] bottomDataModelArr = {null};
        Object obj = mItemObject;
        if (obj == null) {
            try {
                HashMap<String, BottomDataModel> hashMap2 = UiUtils.mCommonTemplateHashMap;
                if (hashMap2.size() >= 0) {
                    for (Map.Entry<String, BottomDataModel> entry : hashMap2.entrySet()) {
                        if (entry.getKey().equalsIgnoreCase(str)) {
                            bottomDataModelArr[0] = entry.getValue();
                            break;
                        }
                    }
                } else {
                    NavigationUtils.fetchTemplate(OttSDK.getInstance());
                    new Handler().postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            for (Map.Entry<String, BottomDataModel> entry2 : UiUtils.mCommonTemplateHashMap.entrySet()) {
                                if (entry2.getKey().equalsIgnoreCase(str)) {
                                    bottomDataModelArr[0] = entry2.getValue();
                                    return;
                                }
                            }
                        }
                    }, 1000L);
                }
            } catch (Exception e2) {
                CustomLog.e("TAG", "crash#templateCode :: " + e2.getMessage());
            }
        } else if (obj instanceof BottomDataModel) {
            bottomDataModelArr[0] = (BottomDataModel) obj;
        } else {
            bottomDataModelArr[0] = null;
        }
        if (bottomDataModelArr[0] == null) {
            if (appCompatTextView != null) {
                appCompatTextView.setVisibility(0);
            }
            hidShowProgress(false, progressBar);
            return;
        }
        try {
            final MediaCatalogManager[] mediaCatalogManagerArr = {OttSDK.getInstance().getMediaManager()};
            RestAdapter.enableCache(false);
            final BottomDataModel bottomDataModel = bottomDataModelArr[0];
            final String str7 = str;
            final String str8 = str2;
            try {
                mediaCatalogManagerArr[0].getBottomTemplateInfo(str7, str8, new MediaCatalogManager.MediaCatalogCallback<BottomTemplateInfo>() {
                    @Override
                    public void onFailure(Error error) {
                        AppCompatTextView appCompatTextView2 = appCompatTextView;
                        if (appCompatTextView2 != null) {
                            appCompatTextView2.setVisibility(0);
                            if (error != null && error.getMessage() != null) {
                                appCompatTextView.setText(error.getMessage());
                            }
                        }
                        ActionBottomSheetDialogFragment.this.hidShowProgress(false, progressBar);
                        NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/template/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                    }

                    @Override
                    public void onSuccess(final com.yupptv.ottsdk.model.BottomTemplateInfo r33) {
                        throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.fragments.ActionBottomSheetDialogFragment.AnonymousClass29.onSuccess(com.yupptv.ottsdk.model.BottomTemplateInfo):void");
                    }
                });
            } catch (Exception unused) {
                z = false;
                actionBottomSheetDialogFragment = this;
                progressBar2 = progressBar;
                actionBottomSheetDialogFragment.hidShowProgress(z, progressBar2);
            }
        } catch (Exception unused2) {
            actionBottomSheetDialogFragment = this;
            progressBar2 = progressBar;
            z = false;
        }
    }

    public void fetchDeepLinkInfo(String str, final String str2) {
        FragmentActivity activity = getActivity();
        if (activity != null) {
            OTTApplication.isPlayerPage = true;
            APIUtils.getmMediaManager(activity).getDeeplinkInfo(str, new MediaCatalogManager.MediaCatalogCallback<DeeplinkInfo>() {
                @Override
                public void onFailure(Error error) {
                    if (error != null) {
                        CustomLog.e("detailsFragmentDeepLinkError", " " + error.getMessage());
                        if (error.getCode().equals(404) && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) ("" + error.getMessage()), 0).show();
                        }
                        NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/page/deeplink", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                    }
                }

                @Override
                public void onSuccess(DeeplinkInfo deeplinkInfo) {
                    OTTApplication.isDrawerOpen = false;
                    if (deeplinkInfo == null || deeplinkInfo.getContentCode() == null || deeplinkInfo.getPartnerCode() == null) {
                        return;
                    }
                    HashMap hashMap = new HashMap();
                    hashMap.put("value", "1");
                    if (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity) {
                        NavigationUtils.sendRecoEvents(ActionBottomSheetDialogFragment.this.getActivity(), hashMap);
                        NavigationUtils.startNewActivity(null, ActionBottomSheetDialogFragment.this.getActivity(), deeplinkInfo, ActionBottomSheetDialogFragment.this.networkId, str2);
                    }
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                    }
                }
            });
        }
    }

    @SuppressLint({"RestrictedApi"})
    public void fromDataAPI(AppCompatButton appCompatButton, LinearLayout linearLayout, LinearLayout linearLayout2, LinearLayout linearLayout3, LinearLayout linearLayout4, LinearLayout linearLayout5, TextView textView, TextView textView2, TextView textView3, TextView textView4, TextView textView5, ImageView imageView, ImageView imageView2, ProgressBar progressBar, Resources resources, MediaCatalogManager mediaCatalogManager, String str, LinearLayout.LayoutParams layoutParams, ContextThemeWrapper contextThemeWrapper, LinearLayout.LayoutParams layoutParams2, LinearLayout.LayoutParams layoutParams3, int i2, int i3, AppCompatTextView appCompatTextView, String str2, String str3) {
        if (linearLayout4 != null && linearLayout4.getVisibility() == 0) {
            hidShowProgress(false, progressBar);
            return;
        }
        try {
            linearLayout3.removeAllViewsInLayout();
            linearLayout5.removeAllViewsInLayout();
            linearLayout4.removeAllViewsInLayout();
        } catch (Exception unused) {
        }
        RestAdapter.enableCache(false);
        mediaCatalogManager.getFormData(appCompatButton != null ? (String) appCompatButton.getTag() : str2, str, new AnonymousClass35(linearLayout5, linearLayout4, linearLayout3, resources, layoutParams, i2, contextThemeWrapper, layoutParams2, appCompatButton, str, layoutParams3, i3, progressBar, mediaCatalogManager, str3, str2, linearLayout, linearLayout2, textView, textView2, imageView, imageView2, textView3, textView4, textView5, appCompatTextView));
    }

    private void fromDataAPIBottomPlayer(LinearLayout linearLayout, LinearLayout linearLayout2, TextView textView, TextView textView2, TextView textView3, ImageView imageView, ProgressBar progressBar, Resources resources, MediaCatalogManager mediaCatalogManager, String str, LinearLayout.LayoutParams layoutParams, ContextThemeWrapper contextThemeWrapper, LinearLayout.LayoutParams layoutParams2, LinearLayout.LayoutParams layoutParams3, int i2, int i3, AppCompatTextView appCompatTextView, String str2, String str3) {
        RestAdapter.enableCache(false);
        mediaCatalogManager.getFormData(str2, str, new AnonymousClass34(resources, layoutParams, i2, contextThemeWrapper, linearLayout, textView, str, layoutParams3, i3, progressBar, mediaCatalogManager, linearLayout2, imageView, appCompatTextView));
    }

    public AppCompatButton getAppCompatButton(String str, String str2, int i2, LinearLayout.LayoutParams layoutParams, int i3, ContextThemeWrapper contextThemeWrapper) {
        AppCompatButton appCompatButton = new AppCompatButton(contextThemeWrapper);
        appCompatButton.setText(str);
        appCompatButton.setTextSize(2, 14.0f);
        appCompatButton.setBackgroundResource(i3);
        appCompatButton.setLayoutParams(layoutParams);
        appCompatButton.setId(i2);
        appCompatButton.setSingleLine(true);
        appCompatButton.setEllipsize(TextUtils.TruncateAt.MIDDLE);
        appCompatButton.setTag(str2);
        if (i2 == 0) {
            appCompatButton.setSelected(true);
        }
        return appCompatButton;
    }

    public RadioButton getAppCompatRadioButton(RecordModel recordModel, LinearLayout.LayoutParams layoutParams, int i2, ContextThemeWrapper contextThemeWrapper, Context context, Resources resources) {
        if (getActivity() == null) {
            return null;
        }
        RadioButton radioButton = (RadioButton) View.inflate(getActivity(), R.layout.bottom_radio_button, null);
        this.mRadioButton = radioButton;
        radioButton.setText(recordModel.getTitle());
        this.mRadioButton.setBackgroundResource(i2);
        this.mRadioButton.setLayoutParams(layoutParams);
        this.mRadioButton.setId(recordModel.getId());
        this.mRadioButton.setTag(recordModel);
        this.mRadioButton.setTextColor(resources.getColor(R.color.white_90));
        RadioButton radioButton2 = this.mRadioButton;
        int i3 = R.dimen.margin_default_10;
        radioButton2.setPadding((int) resources.getDimension(i3), 0, (int) resources.getDimension(i3), 0);
        return this.mRadioButton;
    }

    public AppCompatTextView getAppCompatTextView(String str, int i2, LinearLayout.LayoutParams layoutParams, ContextThemeWrapper contextThemeWrapper, boolean z) {
        AppCompatTextView appCompatTextView = new AppCompatTextView(contextThemeWrapper);
        appCompatTextView.setText(str);
        appCompatTextView.setBackground(null);
        appCompatTextView.setLayoutParams(layoutParams);
        appCompatTextView.setId(i2);
        appCompatTextView.setFocusable(false);
        if (!z) {
            appCompatTextView.setTextColor(appCompatTextView.getTextColors().withAlpha(120));
        }
        return appCompatTextView;
    }

    public String getButtonTargetPath(BottomTemplateInfo bottomTemplateInfo, String str) {
        if (str != null && str.trim().length() > 0 && bottomTemplateInfo != null && bottomTemplateInfo.getTemplateResponseJson() != null && bottomTemplateInfo.getTemplateResponseJson().has("target_".concat(str))) {
            try {
                Object obj = bottomTemplateInfo.getTemplateResponseJson().get("target_".concat(str));
                if (obj != null && (obj instanceof String)) {
                    return bottomTemplateInfo.getTemplateResponseJson().get("target_".concat(str)) + "";
                }
            } catch (Exception unused) {
            }
        }
        return null;
    }

    public String getButtonText(BottomTemplateInfo bottomTemplateInfo, String str) {
        if (str != null && str.contains(":")) {
            String[] split = str.split(":");
            if (split.length > 1 && (str = split[1]) != null && str.trim().length() > 0 && bottomTemplateInfo != null && bottomTemplateInfo.getTemplateResponseJson() != null && bottomTemplateInfo.getTemplateResponseJson().has(str)) {
                try {
                    Object obj = bottomTemplateInfo.getTemplateResponseJson().get(str);
                    if (obj != null && (obj instanceof String)) {
                        return (String) obj;
                    }
                    if (obj != null && (obj instanceof Integer)) {
                        return "" + obj;
                    }
                } catch (Exception unused) {
                }
            }
        }
        return str;
    }

    public void getContentPage(final RecordModel recordModel) {
        OttSDK.getInstance().getMediaManager().getPageContent(recordModel.getTargetPath(), new MediaCatalogManager.MediaCatalogCallback<ContentPage>() {
            @Override
            public void onFailure(Error error) {
                NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/v1/page/content", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
            }

            @Override
            public void onSuccess(ContentPage contentPage) {
                if (recordModel.getElementCode().equalsIgnoreCase("add_favourite")) {
                    ActionBottomSheetDialogFragment.this.trackEvents(AnalyticsUtils.EVENT_FAVOURITES, 1, contentPage);
                } else if (recordModel.getElementCode().equalsIgnoreCase("remove_favourite")) {
                    ActionBottomSheetDialogFragment.this.trackEvents(AnalyticsUtils.EVENT_FAVOURITES, 0, contentPage);
                }
            }
        });
    }

    public String getDeeplinkingPath(BottomTemplateInfo bottomTemplateInfo, String str) {
        CustomLog.e("bottomTemplateInfo", str + " " + bottomTemplateInfo.getTemplateResponseJson().toString());
        if (str != null && str.trim().length() > 0 && bottomTemplateInfo.getTemplateResponseJson() != null && bottomTemplateInfo.getTemplateResponseJson().has("isDeeplinking_".concat(str))) {
            try {
                Object obj = bottomTemplateInfo.getTemplateResponseJson().get("isDeeplinking_".concat(str));
                if (obj != null && (obj instanceof String) && ((String) obj).equalsIgnoreCase("true") && bottomTemplateInfo.getTemplateResponseJson().has("target_".concat(str))) {
                    return bottomTemplateInfo.getTemplateResponseJson().get("target_".concat(str)) + "";
                }
            } catch (Exception unused) {
            }
        }
        return null;
    }

    public List<String> getListOfPartnerIcons(String str) {
        String[] split = str.trim().split("\\|");
        ArrayList arrayList = new ArrayList();
        for (int i2 = 0; i2 < split.length; i2++) {
            if (!TextUtils.isEmpty(split[i2])) {
                arrayList.add(split[i2]);
            }
        }
        return arrayList;
    }

    public void getOrderStatus(String str) {
        OttSDK.getInstance().getPaymentManager().getOrderStatus(str, new PaymentManager.PaymentCallback<OrderStatusResponse>() {
            @Override
            public void onFailure(Error error) {
                ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                actionBottomSheetDialogFragment.isTransactionDone = true;
                if (actionBottomSheetDialogFragment.getActivity() == null) {
                    ActionBottomSheetDialogFragment actionBottomSheetDialogFragment2 = ActionBottomSheetDialogFragment.this;
                    actionBottomSheetDialogFragment2.isTransactionDone = true;
                    actionBottomSheetDialogFragment2.handler.removeCallbacks(actionBottomSheetDialogFragment2.transactionAction);
                } else {
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), R.string.sry_transaction_failed, 1).show();
                    }
                    NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/payment/api/v1/order/status", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                }
            }

            @Override
            public void onSuccess(OrderStatusResponse orderStatusResponse) {
                if (ActionBottomSheetDialogFragment.this.getActivity() == null) {
                    ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                    actionBottomSheetDialogFragment.isTransactionDone = true;
                    actionBottomSheetDialogFragment.handler.removeCallbacks(actionBottomSheetDialogFragment.transactionAction);
                }
                String upperCase = orderStatusResponse.getStatus().toUpperCase();
                upperCase.getClass();
                switch (upperCase) {
                    case "F":
                        ActionBottomSheetDialogFragment actionBottomSheetDialogFragment2 = ActionBottomSheetDialogFragment.this;
                        actionBottomSheetDialogFragment2.isTransactionDone = true;
                        Handler handler = actionBottomSheetDialogFragment2.handler;
                        if (handler != null) {
                            handler.removeCallbacks(actionBottomSheetDialogFragment2.transactionAction);
                        }
                        ActionBottomSheetDialogFragment.this.redirectToWebPaymentStatus();
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) orderStatusResponse.getMessage(), 1).show();
                            break;
                        }
                        break;
                    case "P":
                        ActionBottomSheetDialogFragment actionBottomSheetDialogFragment3 = ActionBottomSheetDialogFragment.this;
                        actionBottomSheetDialogFragment3.isTransactionDone = false;
                        if (actionBottomSheetDialogFragment3.getActivity() != null) {
                            Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) (orderStatusResponse.getMessage() + " . " + ActionBottomSheetDialogFragment.this.getActivity().getResources().getString(R.string.donotpressback)), 1).show();
                            break;
                        }
                        break;
                    case "S":
                        ActionBottomSheetDialogFragment actionBottomSheetDialogFragment4 = ActionBottomSheetDialogFragment.this;
                        actionBottomSheetDialogFragment4.isTransactionDone = true;
                        Handler handler2 = actionBottomSheetDialogFragment4.handler;
                        if (handler2 != null) {
                            handler2.removeCallbacks(actionBottomSheetDialogFragment4.transactionAction);
                        }
                        ActionBottomSheetDialogFragment.this.redirectToWebPaymentStatus();
                        break;
                }
            }
        });
    }

    public RelativeLayout getResumeProgressButton(String str, String str2, String str3, int i2, LinearLayout.LayoutParams layoutParams, ContextThemeWrapper contextThemeWrapper) {
        if (getActivity() == null) {
            return null;
        }
        RelativeLayout relativeLayout = (RelativeLayout) View.inflate(getActivity(), R.layout.resume_btn, null);
        this.resumeBtnLayout = relativeLayout;
        AppCompatButton findViewById = relativeLayout.findViewById(R.id.resumeButton);
        ProgressBar progressBar = (ProgressBar) this.resumeBtnLayout.findViewById(R.id.marker_seek);
        findViewById.setText(str);
        progressBar.setProgress((int) (Double.parseDouble(str3) * 100.0d));
        this.resumeBtnLayout.setLayoutParams(layoutParams);
        this.resumeBtnLayout.setId(i2);
        this.resumeBtnLayout.setTag(str2);
        this.resumeBtnLayout.setFocusable(false);
        if (i2 == 0) {
            findViewById.setSelected(true);
        }
        return this.resumeBtnLayout;
    }

    private Dialog guideBottomDialog() {
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity());
        HashMap hashMap = inputHashMap;
        if (hashMap == null || hashMap.get("dialog_template_code").equals("tvguide-popup-sample") || inputHashMap.get("dialog_template_code").equals("tvshow_episode_continue_watching_popup")) {
            this.mBottomSheetDialog.setContentView(R.layout.bottom_rendering_layout);
        } else {
            this.mBottomSheetDialog.setContentView(R.layout.bottom_rendering_layout_new);
            CardView findViewById = this.mBottomSheetDialog.findViewById(R.id.card_view);
            if (findViewById != null) {
                ((ViewGroup.MarginLayoutParams) findViewById.getLayoutParams()).setMargins(0, 0, 0, ((int) getResources().getDimension(R.dimen.margin_default_17)) * (-1));
            }
        }
        FrameLayout frameLayout = (FrameLayout) this.mBottomSheetDialog.findViewById(R.id.design_bottom_sheet);
        frameLayout.setBackgroundColor(0);
        BottomSheetBehavior.from(frameLayout).setState(3);
        this.buttns_horizontal_linear_layout_1 = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.buttns_horizontal_linear_layout_1);
        this.buttns_horizontal_LL_sub_2 = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.buttns_horizontal_LL_sub_2);
        this.upgrade_vertical_LL_3 = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.upgrade_vertical_LL_3);
        this.radiogroup_vertical_LL_4 = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.radiogroup_vertical_LL_4);
        this.bottom_horizontal_LL_5 = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.bottom_horizontal_LL_5);
        this.alert_marker = (TextView) this.mBottomSheetDialog.findViewById(R.id.bottom_marker);
        this.alert_availablesoon_desc_layout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.alert_availablesoon_desc_layout);
        this.alert_availablesoon_desc = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_availablesoon_desc);
        this.alert_marker.setVisibility(4);
        this.mCastLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.cast_layout);
        this.mCastCrewTextView = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_cast);
        this.alert_cast_title = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_cast_title);
        this.imageView_close = (ImageView) this.mBottomSheetDialog.findViewById(R.id.btn_close);
        this.imageView_icon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.imageView_icon);
        this.partner_icon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.partner_icon);
        this.imageView_close.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ActionBottomSheetDialogFragment.this.dismiss();
            }
        });
        TextView textView = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_message);
        TextView textView2 = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_description);
        ProgressBar progressBar = (ProgressBar) this.mBottomSheetDialog.findViewById(R.id.progressBar);
        progressBar.setVisibility(0);
        TextView textView3 = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_subTitle);
        TextView textView4 = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_subTitle1);
        TextView textView5 = (TextView) this.mBottomSheetDialog.findViewById(R.id.alert_subTitle2);
        AppCompatTextView appCompatTextView = (AppCompatTextView) this.mBottomSheetDialog.findViewById(R.id.errorTitle);
        LinearLayout linearLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.llWatchList);
        ImageView imageView = (ImageView) this.mBottomSheetDialog.findViewById(R.id.ivFav);
        TextView textView6 = (TextView) this.mBottomSheetDialog.findViewById(R.id.tvFavBottomSheet);
        LinearLayout linearLayout2 = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.llShare);
        ImageView imageView2 = (ImageView) this.mBottomSheetDialog.findViewById(R.id.ivShare);
        TextView textView7 = (TextView) this.mBottomSheetDialog.findViewById(R.id.tvShareBottomSheet);
        View findViewById2 = this.mBottomSheetDialog.findViewById(R.id.watchListShareDivider);
        this.imdbIv = (ImageView) this.mBottomSheetDialog.findViewById(R.id.imdb_iv);
        this.imdbRatingsText = (TextView) this.mBottomSheetDialog.findViewById(R.id.imdbRatingsTv);
        this.imdbRatingsLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.imbdLayout);
        this.availableTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.available_tv);
        this.availableLableTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.availableLabel_tv);
        this.ageRatingsLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.ageRatingsLayout);
        this.ageRatingsText = (TextView) this.mBottomSheetDialog.findViewById(R.id.ageRatingsTv);
        drawDialog(textView, textView2, this.alert_availablesoon_desc, this.imageView_icon, this.partner_icon, this.buttns_horizontal_linear_layout_1, this.buttns_horizontal_LL_sub_2, this.upgrade_vertical_LL_3, this.radiogroup_vertical_LL_4, this.bottom_horizontal_LL_5, progressBar, textView3, textView4, textView5, appCompatTextView, linearLayout, linearLayout2, imageView, imageView2, textView6, textView7, findViewById2);
        return this.mBottomSheetDialog;
    }

    public void handlePrepaidPostPaidUserFlow(BottomTemplateInfo.TemplateInfo templateInfo) {
        OttSDK oTTSdkInstance = APIUtils.getOTTSdkInstance(getActivity());
        if (templateInfo == null) {
            return;
        }
        String target_subscribe = templateInfo.getTarget_subscribe();
        if (TextUtils.isEmpty(target_subscribe)) {
            target_subscribe = templateInfo.getTarget_button();
        }
        String str = target_subscribe;
        String premiumPackageId = templateInfo.getPremiumPackageId();
        String premiumPackageGateway = templateInfo.getPremiumPackageGateway();
        if (APIUtils.getUtilPreferenceManager(getActivity()).getLoggedUser() != null) {
            int intValue = APIUtils.getUtilPreferenceManager(getActivity()).getLoggedUser().getUserCategory().intValue();
            if (intValue != 1 && intValue != 3) {
                String premiumPackageId2 = templateInfo.getPremiumPackageId();
                String premiumPackageGateway2 = templateInfo.getPremiumPackageGateway();
                PostpaidBillingConfirmationPopup postpaidBillingConfirmationPopup = oTTSdkInstance.getPreferenceManager().getPostpaidBillingConfirmationPopup() != null ? oTTSdkInstance.getPreferenceManager().getPostpaidBillingConfirmationPopup() : null;
                String salePrice = templateInfo.getSalePrice() != null ? templateInfo.getSalePrice() : "";
                if (!TextUtils.isEmpty(premiumPackageGateway2) && premiumPackageGateway2.equalsIgnoreCase("sdpse") && postpaidBillingConfirmationPopup != null && postpaidBillingConfirmationPopup.getShowConfirmationPopup().equalsIgnoreCase("true")) {
                    showPostPaidBillingConfirmationPopup(postpaidBillingConfirmationPopup, str, premiumPackageId2, premiumPackageGateway2, salePrice);
                    return;
                }
                if (getActivity() == null || TextUtils.isEmpty(str) || TextUtils.isEmpty(premiumPackageId) || TextUtils.isEmpty(premiumPackageGateway) || !(getActivity() instanceof FusionViliteMainActivity)) {
                    return;
                }
                getActivity().launchSubscribeUpgradePlanWebView(contentPath, str, premiumPackageId, premiumPackageGateway);
                return;
            }
            if (templateInfo.getIsInternal() == null || (templateInfo.getIsInternal().equalsIgnoreCase("false") && !TextUtils.isEmpty(str))) {
                this.mBottomSheetDialog.dismiss();
                if (OTTApplication.getWebLinkCallback() != null) {
                    OTTApplication.getWebLinkCallback().callWebLink(str);
                    if (getActivity() != null) {
                        getActivity().finish();
                        return;
                    }
                    return;
                }
                return;
            }
            if (templateInfo.getIsInternal() == null || !templateInfo.getIsInternal().equalsIgnoreCase("true") || TextUtils.isEmpty(str) || getActivity() == null || !(getActivity() instanceof FusionViliteMainActivity)) {
                return;
            }
            getActivity().selectHomeOnPopFromWebView = true;
            getActivity().launchWebviewPlansPage(contentPath, str, subscriptionSource, premiumPackageGateway, premiumPackageId);
        }
    }

    public void hidShowProgress(boolean z, ProgressBar progressBar) {
        if (progressBar != null) {
            if (z) {
                progressBar.setVisibility(0);
            } else {
                progressBar.setVisibility(8);
            }
        }
    }

    public void hideSecondBottomLayout() {
        LinearLayout linearLayout = this.buttns_horizontal_LL_sub_2;
        if (linearLayout != null && linearLayout.getVisibility() == 0) {
            this.buttns_horizontal_LL_sub_2.setVisibility(8);
        }
        LinearLayout linearLayout2 = this.upgrade_vertical_LL_3;
        if (linearLayout2 != null && linearLayout2.getVisibility() == 0) {
            this.upgrade_vertical_LL_3.setVisibility(8);
        }
        LinearLayout linearLayout3 = this.radiogroup_vertical_LL_4;
        if (linearLayout3 != null && linearLayout3.getVisibility() == 0) {
            this.radiogroup_vertical_LL_4.setVisibility(8);
        }
        LinearLayout linearLayout4 = this.bottom_horizontal_LL_5;
        if (linearLayout4 != null && linearLayout4.getVisibility() == 0) {
            this.bottom_horizontal_LL_5.setVisibility(8);
        }
        LinearLayout linearLayout5 = this.buttns_horizontal_linear_layout_1;
        if (linearLayout5 == null || linearLayout5.getVisibility() != 0) {
            return;
        }
        resetButtonBackgrounds(this.buttns_horizontal_linear_layout_1);
    }

    private void hideSoftKeyboard() {
        InputMethodManager inputMethodManager;
        EditText editText = this.couponEditText;
        if (editText == null || (inputMethodManager = (InputMethodManager) editText.getContext().getSystemService("input_method")) == null) {
            return;
        }
        inputMethodManager.hideSoftInputFromWindow(this.couponEditText.getWindowToken(), 0);
    }

    public boolean isBottomSecondLayoutVisible() {
        LinearLayout linearLayout = this.upgrade_vertical_LL_3;
        if (linearLayout != null && linearLayout.getVisibility() == 0) {
            return true;
        }
        LinearLayout linearLayout2 = this.radiogroup_vertical_LL_4;
        if (linearLayout2 != null && linearLayout2.getVisibility() == 0) {
            return true;
        }
        LinearLayout linearLayout3 = this.bottom_horizontal_LL_5;
        return linearLayout3 != null && linearLayout3.getVisibility() == 0;
    }

    private boolean isPreviewContent(Card card) {
        if (!TextUtils.isEmpty(card.getCardType()) && PosterType.getPosterType(card.getCardType()) == PosterType.PARTNER_BANNER2 && card.getHover() != null && card.getHover().getElements() != null && com.yupptv.ott.adapters.o.a(card) > 0) {
            for (int i2 = 0; i2 < com.yupptv.ott.adapters.o.a(card); i2++) {
                if (((Card.HoverElement) com.yupptv.ott.adapters.p.a(card, i2)).getKey() != null && ((Card.HoverElement) com.yupptv.ott.adapters.p.a(card, i2)).getKey().equalsIgnoreCase("previewurl") && !TextUtils.isEmpty(((Card.HoverElement) com.yupptv.ott.adapters.p.a(card, i2)).getValue())) {
                    return true;
                }
            }
        }
        return false;
    }

    public void lambda$changeUpiJuspayCallPopup$0(Animation animation) {
        this.bottomSheetLayout.setVisibility(0);
        this.bottomSheetLayout.startAnimation(animation);
    }

    public void lambda$noProUserSheetDialog$3(String str, View view) {
        CleverTap.moviesEventSubscriptionPageClicked(str, subscriptionSource, packName, "popup closed", "popup closed", "");
        this.mBottomSheetDialog.dismiss();
    }

    public void lambda$proUserPopupDialog$4(View view) {
        String str = Utils.isVimtvAppInstalledOrNot(getActivity(), "com.vodafone.vodafoneplay") ? "click to launch" : "click to install";
        MyRecoManager.getInstance().setPOPUP_NAME("pro user premium content click");
        MyRecoManager.getInstance().setLABEL(str);
        MyRecoManager.getInstance().setACTION("button clicked");
        MyRecoManager.getInstance().setBUTTON_LABEL(this.proUserCancelBtn.getText().toString());
        stopTimer_redirect();
        this.proUserPopupDialog.dismiss();
    }

    public void lambda$showPostPaidBillingConfirmationPopup$5(String str, String str2, String str3) {
        ctEventPopup(mItemObject, str, str2, "popup displayed", "");
        CleverTap.moviesEventSubscriptionPageAppeared(str, subscriptionSource, packName, str3);
        CleverTap.moviesEventPostpaidConfirmationPopupAppeared(subscriptionSource, "yes");
    }

    public void lambda$showPostPaidBillingConfirmationPopup$6(String str, String str2, String str3, String str4, String str5, View view) {
        String charSequence = this.confirmPopupButton.getText().toString();
        CleverTap.moviesEventSubscriptionPageClicked(str, subscriptionSource, packName, "button clicked", charSequence, str2);
        CleverTap.moviesEventPostpaidConfirmationPopupAction(subscriptionSource, charSequence);
        if (!TextUtils.isEmpty(str3) && !TextUtils.isEmpty(str4) && !TextUtils.isEmpty(str5) && (getActivity() instanceof FusionViliteMainActivity)) {
            getActivity().launchSubscribeUpgradePlanWebView(contentPath, str3, str4, str5);
            this.postPaidBillingConfirmationDialog.dismiss();
        }
        BottomSheetDialog bottomSheetDialog = this.mBottomSheetDialog;
        if (bottomSheetDialog != null) {
            bottomSheetDialog.dismiss();
        }
    }

    public void lambda$showPostPaidBillingConfirmationPopup$7(String str, String str2, View view) {
        CleverTap.moviesEventSubscriptionPageClicked(str, subscriptionSource, packName, "button clicked", this.confirmCancelTv.getText().toString(), str2);
        CleverTap.moviesEventPostpaidConfirmationPopupAction(subscriptionSource, this.confirmCancelTv.getText().toString());
        this.postPaidBillingConfirmationDialog.dismiss();
    }

    public void lambda$voucherApplyDialog$1(View view) {
        dismiss();
    }

    public void lambda$voucherApplyDialog$2(AppCompatButton appCompatButton, View view) {
        if (this.couponEditText.getText().toString().trim().isEmpty() || this.couponEditText.getText().toString().length() < this.maxlength) {
            this.couponEditText.setBackground(getResources().getDrawable(R.drawable.voucher_dotted_border_error));
            this.errorTextView.setVisibility(0);
            hideSoftKeyboard();
        } else {
            BottomButtonsActionListener bottomButtonsActionListener = mListener;
            if (bottomButtonsActionListener != null) {
                bottomButtonsActionListener.onButtonClicked(appCompatButton, this.couponEditText.getText().toString(), ButtonType.NONE);
            }
        }
    }

    private void loadPopupData(JSONObject jSONObject, TextView textView, TextView textView2, TextView textView3, AppCompatButton appCompatButton, AppCompatButton appCompatButton2) {
        if (textView != null) {
            try {
                if (jSONObject.has("name") && !TextUtils.isEmpty(jSONObject.getString("name"))) {
                    textView.setText(jSONObject.getString("name"));
                }
            } catch (Exception unused) {
                return;
            }
        }
        if (textView2 != null && jSONObject.has("description") && !TextUtils.isEmpty(jSONObject.getString("description"))) {
            textView2.setText(jSONObject.getString("description"));
        }
        if (textView3 != null && jSONObject.has("details") && !TextUtils.isEmpty(jSONObject.getString("details"))) {
            textView3.setText(jSONObject.getString("details"));
        }
        if (appCompatButton != null && jSONObject.has("subscribe") && !TextUtils.isEmpty(jSONObject.getString("subscribe"))) {
            appCompatButton.setText(jSONObject.getString("subscribe"));
        }
        if (appCompatButton2 == null || !jSONObject.has("close") || TextUtils.isEmpty(jSONObject.getString("close"))) {
            return;
        }
        appCompatButton2.setText(jSONObject.getString("close"));
    }

    public void logoutUserRedirectToSignin() {
        OttSDK.getInstance().getUserManager().logout(new UserManager.UserCallback<String>() {
            @Override
            public void onEmptySuccess() {
                com.yupptv.ottsdk.managers.User.a.a(this);
            }

            @Override
            public void onFailure(Error error) {
                if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) "Failed to Logout", 0).show();
                }
                NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/auth/signout", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
            }

            @Override
            public void onSuccess(String str) {
                if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                    Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) "Logged out", 0).show();
                    NavigationUtils.loadScreenActivityForResult(ActionBottomSheetDialogFragment.this.getActivity(), ScreenType.SIGNIN, NavigationConstants.NAV_COCP_USER_SIGN_IN, (String) null, 37, "bottom sheet", "cocp logout");
                }
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
        });
    }

    private Dialog lsdk_secondepisode_dialog() {
        String str;
        User a;
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity(), R.style.NoBackgroundDialogTheme);
        this.mBottomSheetDialog.setContentView(LayoutInflater.from(getActivity()).inflate(R.layout.secondepisode_dialog, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false));
        this.title_textview_secondepisode = (TextView) this.mBottomSheetDialog.findViewById(R.id.title_textview_secondepisode);
        this.subtitle_textview_secondepisode = (TextView) this.mBottomSheetDialog.findViewById(R.id.subtitle_textview_secondepisode);
        this.main_imageview_secondepisode = this.mBottomSheetDialog.findViewById(R.id.main_imageview_secondepisode);
        this.dialog_cancel_icon_secondepisode = (ImageView) this.mBottomSheetDialog.findViewById(R.id.dialog_cancel_icon_secondepisode);
        this.button_secondepisode = this.mBottomSheetDialog.findViewById(R.id.button_secondepisode);
        final String str2 = "pro subscription";
        if (OttSDK.getInstance() != null && OttSDK.getInstance().getPreferenceManager() != null && com.yupptv.ott.adapters.s.a() != null && (a = com.yupptv.ott.adapters.s.a()) != null) {
            if (a.getUserCategory().intValue() == 1) {
                str = "prepaid pro subscription";
            } else if (a.getUserCategory().intValue() == 2) {
                str = "non vi pro subscription";
            } else if (a.getUserCategory().intValue() == 3) {
                str = "postpaid pro subscription";
            }
            final String str3 = str;
            this.dialog_cancel_icon_secondepisode.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str2, str3, "popup closed", "NA");
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                }
            });
            createLsdkSecondepisodeDialog("pro subscription", str3, this.title_textview_secondepisode, this.subtitle_textview_secondepisode, this.main_imageview_secondepisode, this.button_secondepisode);
            return this.mBottomSheetDialog;
        }
        str = "click to get";
        final String str32 = str;
        this.dialog_cancel_icon_secondepisode.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ActionBottomSheetDialogFragment.this.ctEventPopup(ActionBottomSheetDialogFragment.mItemObject, str2, str32, "popup closed", "NA");
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
        });
        createLsdkSecondepisodeDialog("pro subscription", str32, this.title_textview_secondepisode, this.subtitle_textview_secondepisode, this.main_imageview_secondepisode, this.button_secondepisode);
        return this.mBottomSheetDialog;
    }

    public static ActionBottomSheetDialogFragment newInstance(String str, DialogType dialogType2, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
        CustomDialogFragment customDialogFragment = new CustomDialogFragment();
        Bundle bundle = new Bundle();
        bundle.putSerializable(Constants.DIALOG_TYPE, dialogType2);
        inputHashMap = hashMap;
        mListener = bottomButtonsActionListener;
        mItemObject = obj;
        subscriptionSource = str;
        dialogType = dialogType2;
        customDialogFragment.setArguments(bundle);
        Object obj2 = mItemObject;
        if (obj2 != null) {
            if (obj2 instanceof ContentPage) {
                contentPath = ((ContentPage) obj2).getPageInfo().getPath();
            } else if (obj2 instanceof Card) {
                contentPath = ((Card) obj2).getTarget().getPath();
            }
        }
        return new ActionBottomSheetDialogFragment();
    }

    private Dialog noProUserSheetDialog() {
        String str;
        User a;
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity(), R.style.NoBackgroundDialogTheme);
        View inflate = LayoutInflater.from(getActivity()).inflate(R.layout.no_pro_user_sheet, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false);
        this.mBottomSheetDialog.setContentView(inflate);
        this.noProTitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.no_pro_title_textview);
        LinearLayout linearLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.no_pro_user_sheet_root);
        this.bottomSheetLayout = linearLayout;
        linearLayout.setVisibility(8);
        this.noProTitleTv.setTypeface(ResourcesCompat.getFont(this.noProTitleTv.getContext(), R.font.font_style_gotham_bold));
        this.noProSubtitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.no_pro_subtitle_textview);
        this.noProImageview = this.mBottomSheetDialog.findViewById(R.id.no_pro_main_imageview);
        this.noProCancelIcon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.no_pro_dialog_cancel_icon);
        this.noProButton = this.mBottomSheetDialog.findViewById(R.id.no_pro_button);
        BottomSheetBehavior from = BottomSheetBehavior.from((View) inflate.getParent());
        this.mBottomBehavior = from;
        from.setState(3);
        final String str2 = "pro subscription";
        if (OttSDK.getInstance() != null && OttSDK.getInstance().getPreferenceManager() != null && com.yupptv.ott.adapters.s.a() != null && (a = com.yupptv.ott.adapters.s.a()) != null) {
            if (a.getUserCategory().intValue() == 1) {
                str = "prepaid pro subscription";
            } else if (a.getUserCategory().intValue() == 2) {
                str = "non vi pro subscription";
            } else if (a.getUserCategory().intValue() == 3) {
                str = "postpaid pro subscription";
            }
            String str3 = str;
            MyRecoManager.getInstance().setPOPUP_NAME("pro subscription");
            MyRecoManager.getInstance().setLABEL(str3);
            MyRecoManager.getInstance().setBUTTON_LABEL("closed");
            MyRecoManager.getInstance().setACTION("popup closed");
            this.noProCancelIcon.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    ActionBottomSheetDialogFragment.this.lambda$noProUserSheetDialog$3(str2, view);
                }
            });
            createNoProUserSheetDialog("pro subscription", str3, this.noProTitleTv, this.noProSubtitleTv, this.noProImageview, this.noProButton);
            return this.mBottomSheetDialog;
        }
        str = "click to get";
        String str32 = str;
        MyRecoManager.getInstance().setPOPUP_NAME("pro subscription");
        MyRecoManager.getInstance().setLABEL(str32);
        MyRecoManager.getInstance().setBUTTON_LABEL("closed");
        MyRecoManager.getInstance().setACTION("popup closed");
        this.noProCancelIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActionBottomSheetDialogFragment.this.lambda$noProUserSheetDialog$3(str2, view);
            }
        });
        createNoProUserSheetDialog("pro subscription", str32, this.noProTitleTv, this.noProSubtitleTv, this.noProImageview, this.noProButton);
        return this.mBottomSheetDialog;
    }

    public void onLevelOneButtonClicked(AppCompatButton appCompatButton, Object obj, ButtonType buttonType, boolean z) {
        if (isBottomSecondLayoutVisible()) {
            return;
        }
        BottomButtonsActionListener bottomButtonsActionListener = mListener;
        if (bottomButtonsActionListener != null) {
            bottomButtonsActionListener.onButtonClicked(appCompatButton, obj, buttonType);
        }
        if (z) {
            dismiss();
        }
    }

    private void pauseTimer() {
        CountDownTimer countDownTimer = this.countDownTimer_redirect;
        if (countDownTimer != null) {
            countDownTimer.cancel();
            this.isTimerRunning = false;
        }
    }

    private android.app.Dialog playerBottomDialog() {
        throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.fragments.ActionBottomSheetDialogFragment.playerBottomDialog():android.app.Dialog");
    }

    private Dialog proUserPopupDialog() {
        if (getActivity() == null) {
            return null;
        }
        Dialog dialog = new Dialog(getActivity());
        this.proUserPopupDialog = dialog;
        dialog.setContentView(R.layout.install_open_app_popup);
        this.proUserPopupDialog.getWindow().setLayout(-1, -2);
        this.proUserPopupDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        this.proUserPopupDialog.setCanceledOnTouchOutside(false);
        this.proUserPopupButton = (Button) this.proUserPopupDialog.findViewById(R.id.install_open_popup_button);
        this.proUserPopupPosterImage = (ImageView) this.proUserPopupDialog.findViewById(R.id.install_open_popup_poster_image);
        TextView textView = (TextView) this.proUserPopupDialog.findViewById(R.id.install_open_popup_title);
        this.proUserPopupTitle = textView;
        this.proUserPopupTitle.setTypeface(ResourcesCompat.getFont(textView.getContext(), R.font.font_style_gotham_bold));
        this.proUserPopupSubtitle = (TextView) this.proUserPopupDialog.findViewById(R.id.install_open_popup_subtitle);
        this.proUserPopupRoot = (RelativeLayout) this.proUserPopupDialog.findViewById(R.id.install_open_popup_root);
        Button button = (Button) this.proUserPopupDialog.findViewById(R.id.cancel_button);
        this.proUserCancelBtn = button;
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActionBottomSheetDialogFragment.this.lambda$proUserPopupDialog$4(view);
            }
        });
        createProUserPopupDialog(this.proUserPopupTitle, this.proUserPopupSubtitle, this.proUserPopupPosterImage, this.proUserPopupButton, this.proUserPopupRoot, mItemObject);
        return this.proUserPopupDialog;
    }

    public void redirectToWebPaymentStatus() {
        Configs utilAppConfigurations = getActivity() != null ? APIUtils.getUtilAppConfigurations(getActivity()) : null;
        String paymentstatusurl = utilAppConfigurations != null ? utilAppConfigurations.getPaymentstatusurl() : "";
        if (paymentstatusurl == null || getActivity() == null || !(getActivity() instanceof FusionViliteMainActivity)) {
            return;
        }
        getActivity().selectHomeOnPopFromWebView = true;
        getActivity().launchWebviewPlansPage(contentPath, paymentstatusurl, subscriptionSource);
    }

    private void resetButtonBackgrounds(LinearLayout linearLayout) {
        if (linearLayout == null || getActivity() == null) {
            return;
        }
        for (int i2 = 0; i2 < linearLayout.getChildCount(); i2++) {
            if (linearLayout.getChildAt(i2) != null && (linearLayout.getChildAt(i2) instanceof AppCompatButton)) {
                if (i2 == 0) {
                    linearLayout.getChildAt(i2).setSelected(true);
                    linearLayout.getChildAt(i2).setBackgroundColor(getActivity().getResources().getColor(R.color.errorcolor1));
                } else {
                    linearLayout.getChildAt(i2).setSelected(false);
                    linearLayout.getChildAt(i2).setBackgroundColor(getActivity().getResources().getColor(R.color.button_offFocus_color));
                }
            }
        }
    }

    private void resumeTimer() {
        if (this.isTimerRunning) {
            return;
        }
        startTimer();
    }

    private Dialog returnDeepLinkInfoDialog() {
        String str;
        String str2;
        if (getActivity() == null) {
            return null;
        }
        Dialog dialog = new Dialog(getActivity());
        this.dialog_deeplink_info = dialog;
        dialog.requestWindowFeature(1);
        this.dialog_deeplink_info.setContentView(R.layout.vilite_deeplink_info_popup);
        this.dialog_deeplink_info.getWindow().setLayout(-2, -2);
        this.dialog_deeplink_info.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        ImageView imageView = (ImageView) this.dialog_deeplink_info.findViewById(R.id.main_imageview);
        TextView textView = (TextView) this.dialog_deeplink_info.findViewById(R.id.title);
        TextView textView2 = (TextView) this.dialog_deeplink_info.findViewById(R.id.description_text);
        RelativeLayout relativeLayout = (RelativeLayout) this.dialog_deeplink_info.findViewById(R.id.redirect_popup_root);
        AppCompatButton appCompatButton = (AppCompatButton) this.dialog_deeplink_info.findViewById(R.id.proceed_button);
        AppCompatButton appCompatButton2 = (AppCompatButton) this.dialog_deeplink_info.findViewById(R.id.cancel_button);
        HashMap hashMap = inputHashMap;
        if (hashMap != null) {
            str = hashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            str2 = inputHashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
        } else {
            str = "";
            str2 = str;
        }
        createDeepLinkInfoDialog(imageView, str, str2, relativeLayout, textView, textView2, appCompatButton, appCompatButton2);
        return this.dialog_deeplink_info;
    }

    private Dialog returnExitPopup() {
        String str;
        String str2;
        if (getActivity() == null) {
            return null;
        }
        Dialog dialog = new Dialog(getActivity());
        this.exit_popup_popup = dialog;
        dialog.requestWindowFeature(1);
        this.exit_popup_popup.setContentView(R.layout.exit_popup);
        this.exit_popup_popup.getWindow().setLayout(-1, -2);
        this.exit_popup_popup.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        this.exit_popup_popup.setCanceledOnTouchOutside(false);
        TextView textView = (TextView) this.exit_popup_popup.findViewById(R.id.title);
        TextView textView2 = (TextView) this.exit_popup_popup.findViewById(R.id.subtitle);
        RecyclerView recyclerView = (RecyclerView) this.exit_popup_popup.findViewById(R.id.recycler_view);
        TextView textView3 = (TextView) this.exit_popup_popup.findViewById(R.id.description_text);
        AppCompatButton appCompatButton = (AppCompatButton) this.exit_popup_popup.findViewById(R.id.explore_button);
        AppCompatButton appCompatButton2 = (AppCompatButton) this.exit_popup_popup.findViewById(R.id.exit_button);
        HashMap hashMap = inputHashMap;
        if (hashMap != null) {
            str = hashMap.containsKey("dialog_template_code") ? (String) inputHashMap.get("dialog_template_code") : "";
            str2 = inputHashMap.containsKey("dialog_key_target_path") ? (String) inputHashMap.get("dialog_key_target_path") : "";
        } else {
            str = "";
            str2 = str;
        }
        createExitDialog(textView, textView2, textView3, appCompatButton, appCompatButton2, recyclerView, str, str2);
        return this.exit_popup_popup;
    }

    public void setImageRoundedCorner(ShapeableImageView shapeableImageView) {
        shapeableImageView.setShapeAppearanceModel(shapeableImageView.getShapeAppearanceModel().toBuilder().setTopLeftCornerSize(80.0f).setTopRightCornerSize(80.0f).build());
    }

    public void setViewVisibility(View view, boolean z) {
        if (z) {
            view.setVisibility(0);
        } else {
            view.setVisibility(8);
        }
    }

    public void share(Context context, String str, final String str2, final String str3) {
        if (context != null && str != null && !str.equalsIgnoreCase("") && str.length() > 0) {
            Glide.with(context.getApplicationContext()).asBitmap().load(APIUtils.getAbsoluteImagePath(context, str)).diskCacheStrategy(DiskCacheStrategy.ALL).dontAnimate().into(new CustomTarget<Bitmap>() {
                public void onLoadCleared(@Nullable Drawable drawable) {
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        UiUtils.prepareShareIntent(ActionBottomSheetDialogFragment.this.getActivity(), null, str2 + "\n\n" + str3);
                    }
                }

                public void onLoadFailed(@Nullable Drawable drawable) {
                    super.onLoadFailed(drawable);
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        UiUtils.prepareShareIntent(ActionBottomSheetDialogFragment.this.getActivity(), null, str2 + "\n\n" + str3);
                    }
                }

                public void onResourceReady(@NonNull Object obj, @Nullable Transition transition) {
                    onResourceReady((Bitmap) obj, (Transition<? super Bitmap>) transition);
                }

                public void onResourceReady(@NonNull Bitmap bitmap, @Nullable Transition<? super Bitmap> transition) {
                    if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                        UiUtils.prepareShareIntent(ActionBottomSheetDialogFragment.this.getActivity(), bitmap, str2 + "\n\n" + str3);
                    }
                }
            });
            return;
        }
        UiUtils.prepareShareIntent(getActivity(), null, str2 + "\n\n" + str3);
    }

    private void showPostPaidBillingConfirmationPopup(PostpaidBillingConfirmationPopup postpaidBillingConfirmationPopup, final String str, final String str2, final String str3, String str4) {
        if (getActivity() == null) {
            return;
        }
        Dialog dialog = new Dialog(getActivity());
        this.postPaidBillingConfirmationDialog = dialog;
        dialog.setContentView(R.layout.post_paid_billing_confirm_popup);
        this.postPaidBillingConfirmationDialog.getWindow().setLayout(-1, -2);
        this.postPaidBillingConfirmationDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        Dialog dialog2 = this.postPaidBillingConfirmationDialog;
        if (dialog2 == null || postpaidBillingConfirmationPopup == null) {
            return;
        }
        this.confirmPopupTitle = (TextView) dialog2.findViewById(R.id.confirm_popup_title);
        this.confirmPopupSubtitle = (TextView) this.postPaidBillingConfirmationDialog.findViewById(R.id.confirm_popup_subtitle);
        this.confirmPopupButton = this.postPaidBillingConfirmationDialog.findViewById(R.id.confirm_popup_button);
        this.confirmCancelTv = (TextView) this.postPaidBillingConfirmationDialog.findViewById(R.id.confirm_cancel_tv);
        TextView textView = this.confirmPopupTitle;
        if (textView != null) {
            textView.setText(postpaidBillingConfirmationPopup.getTitle());
        }
        TextView textView2 = this.confirmPopupSubtitle;
        if (textView2 != null) {
            textView2.setText(postpaidBillingConfirmationPopup.getSubtitle());
        }
        AppCompatButton appCompatButton = this.confirmPopupButton;
        if (appCompatButton != null) {
            appCompatButton.setText(postpaidBillingConfirmationPopup.getBottonText());
        }
        TextView textView3 = this.confirmCancelTv;
        if (textView3 != null) {
            textView3.setPaintFlags(textView3.getPaintFlags() | 8);
        }
        final String replaceAll = str4.replaceAll("[^0-9.]", "");
        final String str5 = "Postpaid Confirmation";
        final String str6 = "Postpaid Confirmation";
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                ActionBottomSheetDialogFragment.this.lambda$showPostPaidBillingConfirmationPopup$5(str5, str6, replaceAll);
            }
        }, 1000L);
        MyRecoManager.getInstance().setPOPUP_NAME("Postpaid Confirmation");
        MyRecoManager.getInstance().setLABEL("Postpaid Confirmation");
        MyRecoManager.getInstance().setBUTTON_LABEL(this.confirmPopupButton.getText().toString());
        MyRecoManager.getInstance().setACTION("button clicked");
        this.confirmPopupButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActionBottomSheetDialogFragment.this.lambda$showPostPaidBillingConfirmationPopup$6(str5, replaceAll, str, str2, str3, view);
            }
        });
        MyRecoManager.getInstance().setPOPUP_NAME("Postpaid Confirmation");
        MyRecoManager.getInstance().setLABEL("Postpaid Confirmation");
        MyRecoManager.getInstance().setBUTTON_LABEL(this.confirmCancelTv.getText().toString());
        MyRecoManager.getInstance().setACTION("button clicked");
        this.confirmCancelTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActionBottomSheetDialogFragment.this.lambda$showPostPaidBillingConfirmationPopup$7(str5, replaceAll, view);
            }
        });
        this.postPaidBillingConfirmationDialog.show();
    }

    private void startTimer() {
        if (this.timeRemaining <= 0) {
            return;
        }
        this.countDownTimer_redirect = new CountDownTimer(this.timeRemaining, 1000L) {
            @Override
            public void onFinish() {
                if (ActionBottomSheetDialogFragment.this.timeRemaining / 1000 != 0) {
                    if (!ActionBottomSheetDialogFragment.dialogType.equals(DialogType.DEEPLINK_INFO)) {
                        ActionBottomSheetDialogFragment.this.deeplinkRedirection();
                        return;
                    }
                    ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                    actionBottomSheetDialogFragment.fetchDeepLinkInfo(actionBottomSheetDialogFragment.target_watchNow, ActionBottomSheetDialogFragment.this.target_watchNow);
                    ActionBottomSheetDialogFragment.this.dialog_deeplink_info.dismiss();
                }
            }

            @Override
            public void onTick(long j) {
                if (((int) j) / 1000 == 0) {
                    ActionBottomSheetDialogFragment.this.isAutoReDirection = true;
                    if (ActionBottomSheetDialogFragment.dialogType.equals(DialogType.DEEPLINK_INFO)) {
                        ActionBottomSheetDialogFragment actionBottomSheetDialogFragment = ActionBottomSheetDialogFragment.this;
                        actionBottomSheetDialogFragment.fetchDeepLinkInfo(actionBottomSheetDialogFragment.target_watchNow, ActionBottomSheetDialogFragment.this.target_watchNow);
                        ActionBottomSheetDialogFragment.this.dialog_deeplink_info.dismiss();
                    } else {
                        ActionBottomSheetDialogFragment.this.deeplinkRedirection();
                    }
                }
                ActionBottomSheetDialogFragment.this.timeRemaining = j;
            }
        }.start();
        this.isTimerRunning = true;
    }

    public void startTimerWithInitialTime(Long l) {
        this.timeRemaining = l.longValue();
        startTimer();
    }

    public void stopTimer_redirect() {
        CountDownTimer countDownTimer = this.countDownTimer_redirect;
        if (countDownTimer != null) {
            countDownTimer.cancel();
        }
    }

    private Dialog subscribeSheetDialog() {
        String str;
        User a;
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity(), R.style.NoBackgroundDialogTheme);
        this.mBottomSheetDialog.setContentView(LayoutInflater.from(getActivity()).inflate(R.layout.bottom_subscribe_sheet, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false));
        this.mainImage = this.mBottomSheetDialog.findViewById(R.id.main_imageview);
        this.subscribeButton = this.mBottomSheetDialog.findViewById(R.id.subscribe_button);
        this.titleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.title_textview);
        this.subtitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.subtitle_textview);
        this.planNameTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.plan_name_textview);
        this.showExploreTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.show_explore_textview);
        this.salesPriceTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.sales_price_textview);
        this.showNetworkTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.show_network_textview);
        this.bottomSubscribeSheetRootLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.bottom_subscribe_sheet_root);
        this.inclusionRecyclerLL = (RelativeLayout) this.mBottomSheetDialog.findViewById(R.id.inclusion_recycler_LL);
        this.partnerIconsRecyclerView = this.mBottomSheetDialog.findViewById(R.id.partner_icon_recyclerview);
        this.dialogCancelIcon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.dialog_cancel_icon);
        if (OttSDK.getInstance() != null && OttSDK.getInstance().getPreferenceManager() != null && com.yupptv.ott.adapters.s.a() != null && (a = com.yupptv.ott.adapters.s.a()) != null) {
            if (a.getUserCategory().intValue() == 1) {
                str = "prepaid pro subscription";
            } else if (a.getUserCategory().intValue() == 2) {
                str = "postpaid pro subscription";
            } else if (a.getUserCategory().intValue() == 3) {
                str = "non vi subscription";
            }
            MyRecoManager.getInstance().setPOPUP_NAME("pro subscription");
            MyRecoManager.getInstance().setLABEL(str);
            MyRecoManager.getInstance().setBUTTON_LABEL("closed");
            MyRecoManager.getInstance().setACTION("popup closed");
            this.dialogCancelIcon.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                    if (ActionBottomSheetDialogFragment.subscriptionSource == null) {
                        String unused = ActionBottomSheetDialogFragment.subscriptionSource = MyRecoManager.getInstance().getSourceForAnalytics();
                    }
                    CleverTap.moviesEventSubscriptionPageClicked("pro subscription", ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "popup closed", "closed", "");
                }
            });
            TextView textView = this.showExploreTv;
            textView.setPaintFlags(textView.getPaintFlags() | 8);
            createSubscribeSheetDialog(this.titleTv, this.subtitleTv, this.planNameTv, this.showExploreTv, this.salesPriceTv, this.showNetworkTv, this.mainImage, this.subscribeButton, this.inclusionRecyclerLL, this.partnerIconsRecyclerView, this.bottomSubscribeSheetRootLayout, this.dialogCancelIcon);
            return this.mBottomSheetDialog;
        }
        str = "pro subscription";
        MyRecoManager.getInstance().setPOPUP_NAME("pro subscription");
        MyRecoManager.getInstance().setLABEL(str);
        MyRecoManager.getInstance().setBUTTON_LABEL("closed");
        MyRecoManager.getInstance().setACTION("popup closed");
        this.dialogCancelIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                if (ActionBottomSheetDialogFragment.subscriptionSource == null) {
                    String unused = ActionBottomSheetDialogFragment.subscriptionSource = MyRecoManager.getInstance().getSourceForAnalytics();
                }
                CleverTap.moviesEventSubscriptionPageClicked("pro subscription", ActionBottomSheetDialogFragment.subscriptionSource, ActionBottomSheetDialogFragment.packName, "popup closed", "closed", "");
            }
        });
        TextView textView2 = this.showExploreTv;
        textView2.setPaintFlags(textView2.getPaintFlags() | 8);
        createSubscribeSheetDialog(this.titleTv, this.subtitleTv, this.planNameTv, this.showExploreTv, this.salesPriceTv, this.showNetworkTv, this.mainImage, this.subscribeButton, this.inclusionRecyclerLL, this.partnerIconsRecyclerView, this.bottomSubscribeSheetRootLayout, this.dialogCancelIcon);
        return this.mBottomSheetDialog;
    }

    public void trackEvents(String str, int i2, ContentPage contentPage) {
        try {
            HashMap hashMap = new HashMap();
            hashMap.put(AnalyticsUtils.ATTRIBUTE_ACTIONS, i2 == 0 ? AnalyticsUtils.ATTRIBUTE_VALUE_ACTION_REMOVED : AnalyticsUtils.ATTRIBUTE_VALUE_ACTION_ADDED);
            CustomLog.e("TAG", "#ATTRIBUTE_ACTIONS : " + i2);
            AnalyticsUtils.getInstance().trackAnalyticsEvent(ScreenType.BOTTOM_OVERLAY, null, contentPage, null, str, AnalyticsUtils.ATTRIBUTE_VALUE_SOURCE_BOTTOM_OVERLAY, hashMap);
        } catch (NullPointerException unused) {
        }
    }

    public void updateButtonBackgrounds(LinearLayout linearLayout, AppCompatButton appCompatButton) {
        if (linearLayout != null) {
            try {
                if (getActivity() != null) {
                    for (int i2 = 0; i2 < linearLayout.getChildCount(); i2++) {
                        if (linearLayout.getChildAt(i2) != null && (linearLayout.getChildAt(i2) instanceof AppCompatButton)) {
                            if (linearLayout.getChildAt(i2).getId() == appCompatButton.getId()) {
                                linearLayout.getChildAt(i2).setBackgroundColor(getActivity().getResources().getColor(R.color.button_bg_color));
                            } else {
                                linearLayout.getChildAt(i2).setBackgroundColor(getActivity().getResources().getColor(R.color.button_offFocus_color));
                            }
                        }
                    }
                }
            } catch (Exception unused) {
            }
        }
    }

    public void updateFavUnFav(TextView textView, TextView textView2, TextView textView3, ImageView imageView, ImageView imageView2, LinearLayout linearLayout, LinearLayout linearLayout2, LinearLayout linearLayout3, LinearLayout linearLayout4, LinearLayout linearLayout5, ProgressBar progressBar, TextView textView4, TextView textView5, TextView textView6, AppCompatTextView appCompatTextView, LinearLayout linearLayout6, LinearLayout linearLayout7, final ImageView imageView3, ImageView imageView4, final TextView textView7, TextView textView8, View view, boolean z, final String str) {
        OttSDK ottSDK = OttSDK.getInstance();
        if (ottSDK != null && ottSDK.getPreferenceManager() != null && ottSDK.getPreferenceManager().getLoggedUser() != null && ottSDK.getPreferenceManager().getLoggedUser().getUserId() != null) {
            if (this.isfavorite) {
                ottSDK.getUserManager().removeUserFavourite(str, new UserManager.UserCallback<String>() {
                    @Override
                    public void onEmptySuccess() {
                        com.yupptv.ottsdk.managers.User.a.a(this);
                    }

                    @Override
                    public void onFailure(Error error) {
                        CustomLog.e("Content not available", error.getMessage());
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            a.a(error, ActionBottomSheetDialogFragment.this.getActivity(), 1);
                        }
                        NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/auth/user/favourite/item", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                    }

                    @Override
                    public void onSuccess(String str2) {
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) str2, 1).show();
                        }
                        ActionBottomSheetDialogFragment.this.isfavorite = false;
                        if (ActionBottomSheetDialogFragment.this.bottomDataModel != null) {
                            ActionBottomSheetDialogFragment.this.bottomDataModel.setIsFavourite("true");
                        }
                        if (imageView3 != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            imageView3.setImageDrawable(ContextCompat.getDrawable(ActionBottomSheetDialogFragment.this.getActivity(), R.drawable.heart));
                        }
                        if (textView7 == null || ActionBottomSheetDialogFragment.this.getActivity() == null) {
                            return;
                        }
                        textView7.setText(ActionBottomSheetDialogFragment.this.getActivity().getResources().getString(R.string.favourite));
                    }
                });
                return;
            } else {
                ottSDK.getUserManager().addUserFavourite(str, new UserManager.UserCallback<String>() {
                    @Override
                    public void onEmptySuccess() {
                        com.yupptv.ottsdk.managers.User.a.a(this);
                    }

                    @Override
                    public void onFailure(Error error) {
                        CustomLog.e("Content not available", error.getMessage());
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            a.a(error, ActionBottomSheetDialogFragment.this.getActivity(), 1);
                        }
                        NavigationUtils.logKibanaError("ActionBottomSheetDialogFragment", "API", "/service/api/auth/user/favourite/item", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
                    }

                    @Override
                    public void onSuccess(String str2) {
                        ActionBottomSheetDialogFragment.this.isfavorite = true;
                        if (ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            Toast.makeText((Context) ActionBottomSheetDialogFragment.this.getActivity(), (CharSequence) str2, 1).show();
                        }
                        if (ActionBottomSheetDialogFragment.this.bottomDataModel != null) {
                            ActionBottomSheetDialogFragment.this.bottomDataModel.setIsFavourite("false");
                        }
                        if (imageView3 != null && ActionBottomSheetDialogFragment.this.getActivity() != null) {
                            imageView3.setImageDrawable(ContextCompat.getDrawable(ActionBottomSheetDialogFragment.this.getActivity(), R.drawable.heart_selected));
                        }
                        if (textView7 == null || ActionBottomSheetDialogFragment.this.getActivity() == null) {
                            return;
                        }
                        textView7.setText(ActionBottomSheetDialogFragment.this.getActivity().getResources().getString(R.string.favourited));
                    }
                });
                return;
            }
        }
        HashMap hashMap = new HashMap();
        hashMap.put("msg1", getResources().getString(R.string.player_signin_popup_title));
        hashMap.put("msg2", getResources().getString(R.string.player_signin_popup_subtitle));
        if (getActivity() == null) {
            return;
        }
        NavigationUtils.showDialog(getActivity(), DialogType.SIGNIN_SIGNUP_INFO_DIALOG, hashMap, new DialogListener() {
            @Override
            public void itemClicked(boolean z2, int i2, HashMap hashMap2) {
                if (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity) {
                    ActionBottomSheetDialogFragment.this.getActivity().signinPopupVisible = false;
                }
                if (i2 == 1) {
                    NavigationUtils.loadScreenActivityForResult(ActionBottomSheetDialogFragment.this.getActivity(), ScreenType.SIGNIN, NavigationConstants.NAV_FROM_DETAILS, str, 20, false, false);
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                    }
                }
                if (i2 == 2) {
                    NavigationUtils.loadScreenActivityForResult(ActionBottomSheetDialogFragment.this.getActivity(), ScreenType.SIGNUP2, NavigationConstants.NAV_FROM_DETAILS, str, 20, false, false);
                    if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                        ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                    }
                }
            }

            @Override
            public void itemClicked(boolean z2, int i2, int i3) {
                if (ActionBottomSheetDialogFragment.this.getActivity() instanceof FusionViliteMainActivity) {
                    ActionBottomSheetDialogFragment.this.getActivity().signinPopupVisible = false;
                }
            }
        });
    }

    private Dialog upgradeSheetDialog() {
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity(), R.style.NoBackgroundDialogTheme);
        this.mBottomSheetDialog.setContentView(LayoutInflater.from(getActivity()).inflate(R.layout.bottom_upgrade_sheet, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false));
        this.upgradeTitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.upgrade_title_textview);
        this.upgradeSubtitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.upgrade_subtitle_textview);
        this.upgradeMainImageView = this.mBottomSheetDialog.findViewById(R.id.upgrade_main_imageview);
        this.upgradeSubscribeButton = this.mBottomSheetDialog.findViewById(R.id.upgrade_subscribe_button);
        this.currentPlanTitle = (TextView) this.mBottomSheetDialog.findViewById(R.id.current_plan_title);
        this.currentPlanName = (TextView) this.mBottomSheetDialog.findViewById(R.id.current_plan_name);
        this.currentPlanNetworkCount = (TextView) this.mBottomSheetDialog.findViewById(R.id.current_plan_network_count);
        this.currentPlanSalesPrice = (TextView) this.mBottomSheetDialog.findViewById(R.id.current_plan_sales_price);
        this.upgradePlanTitle = (TextView) this.mBottomSheetDialog.findViewById(R.id.upgrade_plan_title);
        this.upgradePlanName = (TextView) this.mBottomSheetDialog.findViewById(R.id.upgrade_plan_name);
        this.upgradePlanNetworkCount = (TextView) this.mBottomSheetDialog.findViewById(R.id.upgrade_plan_network_count);
        this.upgradePlanSalesPrice = (TextView) this.mBottomSheetDialog.findViewById(R.id.upgrade_plan_sales_price);
        this.cancelDialogIcon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.upgrade_dialog_cancel_icon);
        MyRecoManager.getInstance().setPOPUP_NAME("upgrade subscription");
        MyRecoManager.getInstance().setLABEL("Subscription Upgrade");
        MyRecoManager.getInstance().setBUTTON_LABEL("closed");
        MyRecoManager.getInstance().setACTION("popup closed");
        this.cancelDialogIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (ActionBottomSheetDialogFragment.this.mBottomSheetDialog != null) {
                    CleverTap.moviesEventSubscriptionPageClicked("upgrade subscription", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "popup closed", "closed", "");
                    ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                }
            }
        });
        this.upgradeSubscribeButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
                Toast.makeText(ActionBottomSheetDialogFragment.this.getContext(), "subscribe the user", 1).show();
            }
        });
        createUpgradeSheetDialog(this.upgradeTitleTv, this.upgradeSubtitleTv, this.upgradeMainImageView, this.upgradeSubscribeButton, this.currentPlanTitle, this.currentPlanName, this.currentPlanNetworkCount, this.currentPlanSalesPrice, this.upgradePlanTitle, this.upgradePlanName, this.upgradePlanNetworkCount, this.upgradePlanSalesPrice);
        return this.mBottomSheetDialog;
    }

    private Dialog userCocpSheetDialog() {
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity(), R.style.NoBackgroundDialogTheme);
        this.mBottomSheetDialog.setContentView(LayoutInflater.from(getActivity()).inflate(R.layout.bottom_user_cocp_sheet, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false));
        LinearLayout linearLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.bottom_user_cocp_sheet_root);
        this.bottomSheetLayout = linearLayout;
        linearLayout.setVisibility(8);
        TextView textView = (TextView) this.mBottomSheetDialog.findViewById(R.id.cocp_title_textview);
        this.cocpTitleTv = textView;
        this.cocpTitleTv.setTypeface(ResourcesCompat.getFont(textView.getContext(), R.font.font_style_gotham_bold));
        this.cocpSubtitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.cocp_subtitle_textview);
        this.cocpImageview = this.mBottomSheetDialog.findViewById(R.id.cocp_main_imageview);
        this.cancelIcon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.cocp_dialog_cancel_icon);
        this.cocpButton = this.mBottomSheetDialog.findViewById(R.id.cocp_button);
        MyRecoManager.getInstance().setPOPUP_NAME("Cocp");
        MyRecoManager.getInstance().setLABEL("cocp");
        MyRecoManager.getInstance().setBUTTON_LABEL("closed");
        MyRecoManager.getInstance().setACTION("popup closed");
        this.cancelIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                CleverTap.moviesEventSubscriptionPageClicked("Cocp", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "popup closed", "closed", "");
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
        });
        createUserCocpSheetDialog(this.cocpTitleTv, this.cocpSubtitleTv, this.cocpImageview, this.cocpButton);
        return this.mBottomSheetDialog;
    }

    private Dialog userSuspendedSheetDialog() {
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity(), R.style.NoBackgroundDialogTheme);
        View inflate = LayoutInflater.from(getActivity()).inflate(R.layout.bottom_user_suspended_sheet, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false);
        this.mBottomSheetDialog.setContentView(inflate);
        BottomSheetBehavior from = BottomSheetBehavior.from((View) inflate.getParent());
        this.mBottomBehavior = from;
        from.setState(3);
        LinearLayout linearLayout = (LinearLayout) this.mBottomSheetDialog.findViewById(R.id.bottom_user_suspended_sheet_root);
        this.bottomSheetLayout = linearLayout;
        linearLayout.setVisibility(8);
        this.suspendedTitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.suspended_title_textview);
        this.suspendedSubtitleTv = (TextView) this.mBottomSheetDialog.findViewById(R.id.suspended_subtitle_textview);
        this.suspendedImageview = this.mBottomSheetDialog.findViewById(R.id.suspended_main_imageview);
        this.suspendedButton = this.mBottomSheetDialog.findViewById(R.id.suspended_button);
        this.suspendedCancelIcon = (ImageView) this.mBottomSheetDialog.findViewById(R.id.suspended_dialog_cancel_icon);
        MyRecoManager.getInstance().setPOPUP_NAME("Suspended");
        MyRecoManager.getInstance().setLABEL("suspended");
        MyRecoManager.getInstance().setBUTTON_LABEL("NA");
        MyRecoManager.getInstance().setACTION("popup closed");
        this.suspendedCancelIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                CleverTap.moviesEventSubscriptionPageClicked("Suspended", ActionBottomSheetDialogFragment.subscriptionSource, "pro", "popup closed", "closed", "");
                ActionBottomSheetDialogFragment.this.mBottomSheetDialog.dismiss();
            }
        });
        createUserSuspendedSheetDialog(this.suspendedTitleTv, this.suspendedSubtitleTv, this.suspendedImageview, this.suspendedButton);
        return this.mBottomSheetDialog;
    }

    private Dialog voucherApplyDialog() {
        String str;
        String str2;
        if (getActivity() == null) {
            return null;
        }
        this.mBottomSheetDialog = new BottomSheetDialog(getActivity());
        View inflate = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_bottom_apply_voucher, (ViewGroup) getActivity().getWindow().getDecorView().getRootView(), false);
        HashMap hashMap = inputHashMap;
        str = "";
        if (hashMap != null) {
            String str3 = hashMap.containsKey(Constants.DIALOG_TITLE) ? (String) inputHashMap.get(Constants.DIALOG_TITLE) : "";
            str = str3;
            str2 = inputHashMap.containsKey(Constants.DIALOG_SUBTITLE) ? (String) inputHashMap.get(Constants.DIALOG_SUBTITLE) : "";
        } else {
            str2 = "";
        }
        this.mBottomSheetDialog.setContentView(inflate);
        ((TextView) this.mBottomSheetDialog.findViewById(R.id.title)).setText(str);
        ((TextView) this.mBottomSheetDialog.findViewById(R.id.subTitle)).setText(str2);
        this.errorTextView = (TextView) this.mBottomSheetDialog.findViewById(R.id.voucherCodeErrorText);
        ((ImageView) this.mBottomSheetDialog.findViewById(R.id.btn_close)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActionBottomSheetDialogFragment.this.lambda$voucherApplyDialog$1(view);
            }
        });
        EditText editText = (EditText) this.mBottomSheetDialog.findViewById(R.id.couponEditText);
        this.couponEditText = editText;
        editText.addTextChangedListener(this.textWatcher);
        if (OttSDK.getInstance() != null && OttSDK.getInstance().getPreferenceManager() != null && OttSDK.getInstance().getPreferenceManager().getConfigurationData() != null && OttSDK.getInstance().getPreferenceManager().getConfigurationData().getConfigs() != null && OttSDK.getInstance().getPreferenceManager().getConfigurationData().getConfigs().getVoucherCodeParams() != null && !OttSDK.getInstance().getPreferenceManager().getConfigurationData().getConfigs().getVoucherCodeParams().trim().isEmpty()) {
            try {
                this.maxlength = Integer.parseInt(new JSONObject(OttSDK.getInstance().getPreferenceManager().getConfigurationData().getConfigs().getVoucherCodeParams()).getString("voucherMaxLen"));
            } catch (Exception unused) {
            }
        }
        this.couponEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(this.maxlength)});
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                ((InputMethodManager) ActionBottomSheetDialogFragment.this.couponEditText.getContext().getSystemService("input_method")).showSoftInput(ActionBottomSheetDialogFragment.this.couponEditText, 0);
            }
        }, 100L);
        final AppCompatButton findViewById = this.mBottomSheetDialog.findViewById(R.id.action_apply);
        findViewById.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActionBottomSheetDialogFragment.this.lambda$voucherApplyDialog$2(findViewById, view);
            }
        });
        this.mBottomSheetDialog.setCanceledOnTouchOutside(false);
        return this.mBottomSheetDialog;
    }

    public void onAttach(Context context) {
        super/*androidx.fragment.app.DialogFragment*/.onAttach(context);
        this.mActivity = getActivity();
    }

    public void onCreate(@Nullable Bundle bundle) {
        super/*androidx.fragment.app.DialogFragment*/.onCreate(bundle);
    }

    public Dialog onCreateDialog(Bundle bundle) {
        super.onCreateDialog(bundle);
        if (dialogType == null) {
            return null;
        }
        switch (AnonymousClass37.$SwitchMap$com$yupptv$ott$enums$DialogType[dialogType.ordinal()]) {
        }
        return null;
    }

    public void onDetach() {
        super/*androidx.fragment.app.DialogFragment*/.onDetach();
    }

    public void onDismiss(DialogInterface dialogInterface) {
        super/*androidx.fragment.app.DialogFragment*/.onDismiss(dialogInterface);
        if (mListener != null) {
            if (getActivity() != null && OTTApplication.isTrailerPaused && !this.pauseTrailer && (getActivity() instanceof FusionViliteMainActivity)) {
                OTTApplication.isTrailerPaused = false;
                getActivity().resumePlayer();
            }
            if (!this.isAutoReDirection && getActivity() != null && (getActivity() instanceof FusionViliteMainActivity) && !getActivity().exitPopupEnabled) {
                ctEventPopup(mItemObject, MyRecoManager.getInstance().getPOPUP_NAME(), MyRecoManager.getInstance().getLABEL(), MyRecoManager.getInstance().getACTION(), MyRecoManager.getInstance().getBUTTON_LABEL());
            }
            this.isAutoReDirection = false;
            mListener.onDismiss();
            mListener = null;
        }
    }

    public void onPause() {
        super/*androidx.fragment.app.Fragment*/.onPause();
        pauseTimer();
    }

    public void onResume() {
        super/*androidx.fragment.app.Fragment*/.onResume();
        resumeTimer();
    }
}