package com.vinfast.companion.notification.ui.widget;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
@kotlin.Metadata(d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\u000b\n\u0002\b\t\u0018\u0000 H2\u00020\u0001:\u0001IB\u0011\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005B\u001b\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006¢\u0006\u0004\b\u0004\u0010\bB#\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006\u0012\u0006\u0010\n\u001a\u00020\t¢\u0006\u0004\b\u0004\u0010\u000bB+\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006\u0012\u0006\u0010\n\u001a\u00020\t\u0012\u0006\u0010\f\u001a\u00020\t¢\u0006\u0004\b\u0004\u0010\rJ1\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0003\u001a\u00020\u00022\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\f\u001a\u00020\tH\u0002¢\u0006\u0004\b\u000f\u0010\rJ\u0017\u0010\u0010\u001a\u00020\u000e2\u0006\u0010\u0003\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0010\u0010\u0005J\u0017\u0010\u0013\u001a\u00020\u000e2\u0006\u0010\u0012\u001a\u00020\u0011H\u0002¢\u0006\u0004\b\u0013\u0010\u0014J\u000f\u0010\u0015\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0015\u0010\u0016J\u000f\u0010\u0017\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0017\u0010\u0016J\u0019\u0010\u001a\u001a\u00020\t2\b\u0010\u0019\u001a\u0004\u0018\u00010\u0018H\u0002¢\u0006\u0004\b\u001a\u0010\u001bJ\u001b\u0010\u001d\u001a\u0004\u0018\u00010\u001c2\b\u0010\u0019\u001a\u0004\u0018\u00010\u0018H\u0002¢\u0006\u0004\b\u001d\u0010\u001eJ\u0017\u0010!\u001a\u00020\u000e2\b\u0010 \u001a\u0004\u0018\u00010\u001f¢\u0006\u0004\b!\u0010\"J\u001b\u0010%\u001a\u00020\u000e2\f\u0010$\u001a\b\u0012\u0004\u0012\u00020\u000e0#¢\u0006\u0004\b%\u0010&R\u0018\u0010*\u001a\u0004\u0018\u00010'8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b(\u0010)R\u0018\u0010,\u001a\u0004\u0018\u00010'8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b+\u0010)R\u0018\u0010.\u001a\u0004\u0018\u00010'8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b-\u0010)R\u0018\u00100\u001a\u0004\u0018\u00010'8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b/\u0010)R\u0018\u00102\u001a\u0004\u0018\u00010'8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b1\u0010)R\u0018\u00105\u001a\u0004\u0018\u00010\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b3\u00104R\u0018\u00109\u001a\u0004\u0018\u0001068\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b7\u00108R\u0018\u0010;\u001a\u0004\u0018\u0001068\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b:\u00108R\u0018\u0010=\u001a\u0004\u0018\u0001068\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b<\u00108R\u0018\u0010@\u001a\u0004\u0018\u00010\u001f8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b>\u0010?R\u0016\u0010D\u001a\u00020A8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bB\u0010CR\u001e\u0010G\u001a\n\u0012\u0004\u0012\u00020\u000e\u0018\u00010#8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bE\u0010F¨\u0006J"}, d2 = {"Lcom/vinfast/companion/notification/ui/widget/ImageBundleView;", "Landroidx/constraintlayout/widget/ConstraintLayout;", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "Landroid/util/AttributeSet;", "attrs", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "", "defStyleAttr", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "defStyleRes", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "", "z", "s", "Landroid/view/View;", "view", "A", "(Landroid/view/View;)V", "y", "()V", "B", "Lcom/vinfast/companion/notificationkit/domain/model/TheftAlertImagePosition;", "position", "q", "(Lcom/vinfast/companion/notificationkit/domain/model/TheftAlertImagePosition;)I", "", "r", "(Lcom/vinfast/companion/notificationkit/domain/model/TheftAlertImagePosition;)Ljava/lang/String;", "Lcom/vinfast/companion/notificationkit/domain/model/TheftAlertImageBundle;", "latestImageBundle", "C", "(Lcom/vinfast/companion/notificationkit/domain/model/TheftAlertImageBundle;)V", "Lkotlin/Function0;", "onClickSeeAllListener", "setOnClickSeeAllListener", "(Lkotlin/jvm/functions/Function0;)V", "Lcom/vinfast/companion/core/widget/LoadingImageView;", "a", "Lcom/vinfast/companion/core/widget/LoadingImageView;", "mImage0", "b", "mImage1", "c", "mImage2", "d", "mImage3", "e", "mImage4", "f", "Landroid/view/View;", "mLayoutPrimaryImageInfo", "Landroid/widget/TextView;", "g", "Landroid/widget/TextView;", "mTvPrimaryImage", "h", "mTvPrimaryImageTime", "i", "mBtnSeeAll", "j", "Lcom/vinfast/companion/notificationkit/domain/model/TheftAlertImageBundle;", "mImageBundle", "", "k", "Z", "mHasSeeAllButton", "l", "Lkotlin/jvm/functions/Function0;", "mOnClickSeeAllListener", "m", "Companion", "notification_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
@kotlin.jvm.internal.SourceDebugExtension
public final class ImageBundleView extends androidx.constraintlayout.widget.ConstraintLayout {

    /* JADX INFO: renamed from: a, reason: from kotlin metadata */
    private com.vinfast.companion.core.widget.LoadingImageView mImage0;

    /* JADX INFO: renamed from: b, reason: from kotlin metadata */
    private com.vinfast.companion.core.widget.LoadingImageView mImage1;

    /* JADX INFO: renamed from: c, reason: from kotlin metadata */
    private com.vinfast.companion.core.widget.LoadingImageView mImage2;

    /* JADX INFO: renamed from: d, reason: from kotlin metadata */
    private com.vinfast.companion.core.widget.LoadingImageView mImage3;

    /* JADX INFO: renamed from: e, reason: from kotlin metadata */
    private com.vinfast.companion.core.widget.LoadingImageView mImage4;

    /* JADX INFO: renamed from: f, reason: from kotlin metadata */
    private android.view.View mLayoutPrimaryImageInfo;

    /* JADX INFO: renamed from: g, reason: from kotlin metadata */
    private android.widget.TextView mTvPrimaryImage;

    /* JADX INFO: renamed from: h, reason: from kotlin metadata */
    private android.widget.TextView mTvPrimaryImageTime;

    /* JADX INFO: renamed from: i, reason: from kotlin metadata */
    private android.widget.TextView mBtnSeeAll;

    /* JADX INFO: renamed from: j, reason: from kotlin metadata */
    private com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle mImageBundle;

    /* JADX INFO: renamed from: k, reason: from kotlin metadata */
    private boolean mHasSeeAllButton;

    /* JADX INFO: renamed from: l, reason: from kotlin metadata */
    private kotlin.jvm.functions.Function0 mOnClickSeeAllListener;

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public ImageBundleView(@org.jetbrains.annotations.NotNull android.content.Context context) {
        this(context, null);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
    }

    private final void A(android.view.View view) {
        java.lang.Object tag;
        com.vinfast.companion.core.widget.LoadingImageView loadingImageView = this.mImage0;
        if (loadingImageView == null || (tag = loadingImageView.getTag()) == null) {
            return;
        }
        java.lang.Object tag2 = view.getTag();
        com.vinfast.companion.core.widget.LoadingImageView loadingImageView2 = this.mImage0;
        if (loadingImageView2 != null) {
            loadingImageView2.setTag(tag2);
        }
        view.setTag(tag);
        y();
    }

    private final void B() {
        java.util.List listC;
        java.util.List listC2;
        java.util.List listC3;
        java.util.List listC4;
        java.util.List listC5;
        if (this.mImageBundle != null) {
            android.view.View view = this.mLayoutPrimaryImageInfo;
            if (view == null || view.getVisibility() != 0) {
                com.vinfast.companion.core.widget.LoadingImageView loadingImageView = this.mImage0;
                com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition theftAlertImagePosition = null;
                if (loadingImageView != null) {
                    com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle = this.mImageBundle;
                    loadingImageView.setTag((theftAlertImageBundle == null || (listC5 = theftAlertImageBundle.c()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) kotlin.collections.CollectionsKt.t0(listC5, 0));
                }
                com.vinfast.companion.core.widget.LoadingImageView loadingImageView2 = this.mImage1;
                if (loadingImageView2 != null) {
                    com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle2 = this.mImageBundle;
                    loadingImageView2.setTag((theftAlertImageBundle2 == null || (listC4 = theftAlertImageBundle2.c()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) kotlin.collections.CollectionsKt.t0(listC4, 1));
                }
                com.vinfast.companion.core.widget.LoadingImageView loadingImageView3 = this.mImage2;
                if (loadingImageView3 != null) {
                    com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle3 = this.mImageBundle;
                    loadingImageView3.setTag((theftAlertImageBundle3 == null || (listC3 = theftAlertImageBundle3.c()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) kotlin.collections.CollectionsKt.t0(listC3, 2));
                }
                com.vinfast.companion.core.widget.LoadingImageView loadingImageView4 = this.mImage3;
                if (loadingImageView4 != null) {
                    com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle4 = this.mImageBundle;
                    loadingImageView4.setTag((theftAlertImageBundle4 == null || (listC2 = theftAlertImageBundle4.c()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) kotlin.collections.CollectionsKt.t0(listC2, 3));
                }
                com.vinfast.companion.core.widget.LoadingImageView loadingImageView5 = this.mImage4;
                if (loadingImageView5 != null) {
                    com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle5 = this.mImageBundle;
                    if (theftAlertImageBundle5 != null && (listC = theftAlertImageBundle5.c()) != null) {
                        theftAlertImagePosition = (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) kotlin.collections.CollectionsKt.t0(listC, 4);
                    }
                    loadingImageView5.setTag(theftAlertImagePosition);
                }
            }
        }
    }

    private final int q(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition position) {
        if (position instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Driver) {
            return com.vinfast.companion.notification.R.string.CA60204_driver_camera;
        }
        if (position instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Left) {
            return com.vinfast.companion.notification.R.string.CA60204_left_camera;
        }
        if (position instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Right) {
            return com.vinfast.companion.notification.R.string.CA60204_right_camera;
        }
        if (position instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Front) {
            return com.vinfast.companion.notification.R.string.CA60204_front_camera;
        }
        return position instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Rear ? com.vinfast.companion.notification.R.string.CA60204_rear_camera : com.vinfast.companion.notification.R.string.CA60204_driver_camera;
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final java.lang.String r(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition position) {
        java.util.Date dateA;
        android.util.ArrayMap arrayMapB;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle = this.mImageBundle;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImage theftAlertImage = (theftAlertImageBundle == null || (arrayMapB = theftAlertImageBundle.b()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImage) arrayMapB.get(position);
        if (theftAlertImage == null || (dateA = theftAlertImage.a()) == null) {
            return null;
        }
        long time = dateA.getTime();
        com.vinfast.companion.core.utils.TimeUtils timeUtils = com.vinfast.companion.core.utils.TimeUtils.a;
        android.content.Context context = getContext();
        kotlin.jvm.internal.Intrinsics.k(context, "getContext(...)");
        java.lang.Long lValueOf = java.lang.Long.valueOf(time);
        android.content.Context context2 = getContext();
        kotlin.jvm.internal.Intrinsics.k(context2, "getContext(...)");
        java.lang.String str = java.lang.String.format(timeUtils.f0(context, lValueOf, com.vinfast.companion.core.utils.localehelper.LocaleHelperExtensionsKt.b(context2)), java.util.Arrays.copyOf(new java.lang.Object[]{java.lang.Long.valueOf(time)}, 1));
        kotlin.jvm.internal.Intrinsics.k(str, "format(...)");
        return str;
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void s(android.content.Context context) {
        if (this.mHasSeeAllButton) {
            android.view.LayoutInflater.from(context).inflate(com.vinfast.companion.notification.R.layout.image_bundle_has_see_all_layout, (android.view.ViewGroup) this, true);
        } else {
            android.view.LayoutInflater.from(context).inflate(com.vinfast.companion.notification.R.layout.image_bundle_layout, (android.view.ViewGroup) this, true);
        }
        this.mImage0 = findViewById(com.vinfast.companion.notification.R.id.imv_car_0);
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewById = findViewById(com.vinfast.companion.notification.R.id.imv_car_1);
        this.mImage1 = loadingImageViewFindViewById;
        if (loadingImageViewFindViewById != null) {
            loadingImageViewFindViewById.setOnClickListener(new android.view.View.OnClickListener() { // from class: u4.a
                @Override // android.view.View.OnClickListener
                public final void onClick(android.view.View view) {
                    com.vinfast.companion.notification.ui.widget.ImageBundleView.t(this.a, view);
                }
            });
        }
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewById2 = findViewById(com.vinfast.companion.notification.R.id.imv_car_2);
        this.mImage2 = loadingImageViewFindViewById2;
        if (loadingImageViewFindViewById2 != null) {
            loadingImageViewFindViewById2.setOnClickListener(new android.view.View.OnClickListener() { // from class: u4.b
                @Override // android.view.View.OnClickListener
                public final void onClick(android.view.View view) {
                    com.vinfast.companion.notification.ui.widget.ImageBundleView.u(this.a, view);
                }
            });
        }
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewById3 = findViewById(com.vinfast.companion.notification.R.id.imv_car_3);
        this.mImage3 = loadingImageViewFindViewById3;
        if (loadingImageViewFindViewById3 != null) {
            loadingImageViewFindViewById3.setOnClickListener(new android.view.View.OnClickListener() { // from class: u4.c
                @Override // android.view.View.OnClickListener
                public final void onClick(android.view.View view) {
                    com.vinfast.companion.notification.ui.widget.ImageBundleView.v(this.a, view);
                }
            });
        }
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewById4 = findViewById(com.vinfast.companion.notification.R.id.imv_car_4);
        this.mImage4 = loadingImageViewFindViewById4;
        if (loadingImageViewFindViewById4 != null) {
            loadingImageViewFindViewById4.setOnClickListener(new android.view.View.OnClickListener() { // from class: u4.d
                @Override // android.view.View.OnClickListener
                public final void onClick(android.view.View view) {
                    com.vinfast.companion.notification.ui.widget.ImageBundleView.w(this.a, view);
                }
            });
        }
        this.mLayoutPrimaryImageInfo = findViewById(com.vinfast.companion.notification.R.id.layout_primary_image_info);
        this.mTvPrimaryImage = (android.widget.TextView) findViewById(com.vinfast.companion.notification.R.id.tv_name);
        this.mTvPrimaryImageTime = (android.widget.TextView) findViewById(com.vinfast.companion.notification.R.id.tv_time);
        android.widget.TextView textView = (android.widget.TextView) findViewById(com.vinfast.companion.notification.R.id.btn_see_all);
        this.mBtnSeeAll = textView;
        if (textView != null) {
            textView.setOnClickListener(new android.view.View.OnClickListener() { // from class: u4.e
                @Override // android.view.View.OnClickListener
                public final void onClick(android.view.View view) {
                    com.vinfast.companion.notification.ui.widget.ImageBundleView.x(this.a, view);
                }
            });
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void t(com.vinfast.companion.notification.ui.widget.ImageBundleView imageBundleView, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.i(view);
        imageBundleView.A(view);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void u(com.vinfast.companion.notification.ui.widget.ImageBundleView imageBundleView, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.i(view);
        imageBundleView.A(view);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void v(com.vinfast.companion.notification.ui.widget.ImageBundleView imageBundleView, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.i(view);
        imageBundleView.A(view);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void w(com.vinfast.companion.notification.ui.widget.ImageBundleView imageBundleView, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.i(view);
        imageBundleView.A(view);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void x(com.vinfast.companion.notification.ui.widget.ImageBundleView imageBundleView, android.view.View view) {
        kotlin.jvm.functions.Function0 function0 = imageBundleView.mOnClickSeeAllListener;
        if (function0 != null) {
            function0.invoke();
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void y() {
        android.util.ArrayMap arrayMapB;
        android.util.ArrayMap arrayMapB2;
        android.util.ArrayMap arrayMapB3;
        android.util.ArrayMap arrayMapB4;
        android.util.ArrayMap arrayMapB5;
        if (this.mImageBundle == null) {
            android.view.View view = this.mLayoutPrimaryImageInfo;
            if (view != null) {
                view.setVisibility(8);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView = this.mImage1;
            if (loadingImageView != null) {
                loadingImageView.setVisibility(8);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView2 = this.mImage2;
            if (loadingImageView2 != null) {
                loadingImageView2.setVisibility(8);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView3 = this.mImage3;
            if (loadingImageView3 != null) {
                loadingImageView3.setVisibility(8);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView4 = this.mImage4;
            if (loadingImageView4 != null) {
                loadingImageView4.setVisibility(8);
            }
            android.widget.TextView textView = this.mBtnSeeAll;
            if (textView != null) {
                textView.setVisibility(8);
            }
        } else {
            B();
            android.view.View view2 = this.mLayoutPrimaryImageInfo;
            if (view2 != null) {
                view2.setVisibility(0);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView5 = this.mImage1;
            if (loadingImageView5 != null) {
                loadingImageView5.setVisibility(0);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView6 = this.mImage2;
            if (loadingImageView6 != null) {
                loadingImageView6.setVisibility(0);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView7 = this.mImage3;
            if (loadingImageView7 != null) {
                loadingImageView7.setVisibility(0);
            }
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView8 = this.mImage4;
            if (loadingImageView8 != null) {
                com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle = this.mImageBundle;
                kotlin.jvm.internal.Intrinsics.i(theftAlertImageBundle);
                loadingImageView8.setVisibility(theftAlertImageBundle.c().size() == 5 ? 0 : 8);
            }
            android.widget.TextView textView2 = this.mBtnSeeAll;
            if (textView2 != null) {
                textView2.setVisibility(0);
            }
        }
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle2 = this.mImageBundle;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImage theftAlertImage = (theftAlertImageBundle2 == null || (arrayMapB5 = theftAlertImageBundle2.b()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImage) arrayMapB5.get(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Driver.d);
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewWithTag = findViewWithTag(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Driver.d);
        if (loadingImageViewFindViewWithTag != null) {
            loadingImageViewFindViewWithTag.setImageSource(theftAlertImage != null ? theftAlertImage.d() : null);
        }
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle3 = this.mImageBundle;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImage theftAlertImage2 = (theftAlertImageBundle3 == null || (arrayMapB4 = theftAlertImageBundle3.b()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImage) arrayMapB4.get(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Front.d);
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewWithTag2 = findViewWithTag(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Front.d);
        if (loadingImageViewFindViewWithTag2 != null) {
            loadingImageViewFindViewWithTag2.setImageSource(theftAlertImage2 != null ? theftAlertImage2.d() : null);
        }
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle4 = this.mImageBundle;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImage theftAlertImage3 = (theftAlertImageBundle4 == null || (arrayMapB3 = theftAlertImageBundle4.b()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImage) arrayMapB3.get(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Left.d);
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewWithTag3 = findViewWithTag(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Left.d);
        if (loadingImageViewFindViewWithTag3 != null) {
            loadingImageViewFindViewWithTag3.setImageSource(theftAlertImage3 != null ? theftAlertImage3.d() : null);
        }
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle5 = this.mImageBundle;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImage theftAlertImage4 = (theftAlertImageBundle5 == null || (arrayMapB2 = theftAlertImageBundle5.b()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImage) arrayMapB2.get(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Rear.d);
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewWithTag4 = findViewWithTag(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Rear.d);
        if (loadingImageViewFindViewWithTag4 != null) {
            loadingImageViewFindViewWithTag4.setImageSource(theftAlertImage4 != null ? theftAlertImage4.d() : null);
        }
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle theftAlertImageBundle6 = this.mImageBundle;
        com.vinfast.companion.notificationkit.domain.model.TheftAlertImage theftAlertImage5 = (theftAlertImageBundle6 == null || (arrayMapB = theftAlertImageBundle6.b()) == null) ? null : (com.vinfast.companion.notificationkit.domain.model.TheftAlertImage) arrayMapB.get(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Right.d);
        com.vinfast.companion.core.widget.LoadingImageView loadingImageViewFindViewWithTag5 = findViewWithTag(com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition.Right.d);
        if (loadingImageViewFindViewWithTag5 != null) {
            loadingImageViewFindViewWithTag5.setImageSource(theftAlertImage5 != null ? theftAlertImage5.d() : null);
        }
        android.widget.TextView textView3 = this.mTvPrimaryImage;
        if (textView3 != null) {
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView9 = this.mImage0;
            java.lang.Object tag = loadingImageView9 != null ? loadingImageView9.getTag() : null;
            textView3.setText(q(tag instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition ? (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) tag : null));
        }
        android.widget.TextView textView4 = this.mTvPrimaryImageTime;
        if (textView4 != null) {
            com.vinfast.companion.core.widget.LoadingImageView loadingImageView10 = this.mImage0;
            java.lang.Object tag2 = loadingImageView10 != null ? loadingImageView10.getTag() : null;
            textView4.setText(r(tag2 instanceof com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition ? (com.vinfast.companion.notificationkit.domain.model.TheftAlertImagePosition) tag2 : null));
        }
    }

    private final void z(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        android.content.res.TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attrs, com.vinfast.companion.notification.R.styleable.ImageBundleView, defStyleAttr, defStyleRes);
        kotlin.jvm.internal.Intrinsics.k(typedArrayObtainStyledAttributes, "obtainStyledAttributes(...)");
        this.mHasSeeAllButton = typedArrayObtainStyledAttributes.getBoolean(com.vinfast.companion.notification.R.styleable.ImageBundleView_IBV_seeAllButton, false);
        typedArrayObtainStyledAttributes.recycle();
    }

    public final void C(com.vinfast.companion.notificationkit.domain.model.TheftAlertImageBundle latestImageBundle) {
        this.mImageBundle = latestImageBundle;
        y();
    }

    public final void setOnClickSeeAllListener(@org.jetbrains.annotations.NotNull kotlin.jvm.functions.Function0<kotlin.Unit> onClickSeeAllListener) {
        kotlin.jvm.internal.Intrinsics.l(onClickSeeAllListener, "onClickSeeAllListener");
        this.mOnClickSeeAllListener = onClickSeeAllListener;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public ImageBundleView(@org.jetbrains.annotations.NotNull android.content.Context context, @org.jetbrains.annotations.Nullable android.util.AttributeSet attributeSet) {
        this(context, attributeSet, 0);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public ImageBundleView(@org.jetbrains.annotations.NotNull android.content.Context context, @org.jetbrains.annotations.Nullable android.util.AttributeSet attributeSet, int i) {
        this(context, attributeSet, i, 0);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ImageBundleView(android.content.Context context, android.util.AttributeSet attributeSet, int i, int i2) {
        super(context, attributeSet, i, i2);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
        z(context, attributeSet, i, i2);
        s(context);
    }
}
