package com.vinfast.companion.main.ui.climate.dialog;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
@kotlin.Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0007\u0018\u0000 #2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0002$%B\u0007¢\u0006\u0004\b\u0003\u0010\u0004J\u000f\u0010\u0006\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0006\u0010\u0004J\u000f\u0010\u0007\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0007\u0010\u0004J\u001f\u0010\f\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\nH\u0002¢\u0006\u0004\b\f\u0010\rJ\u000f\u0010\u000e\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u000e\u0010\u0004J\u000f\u0010\u000f\u001a\u00020\u0005H\u0016¢\u0006\u0004\b\u000f\u0010\u0004J\u000f\u0010\u0010\u001a\u00020\u0005H\u0016¢\u0006\u0004\b\u0010\u0010\u0004R\u0016\u0010\u0013\u001a\u00020\n8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012R\u0016\u0010\u0017\u001a\u00020\u00148\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0015\u0010\u0016R\u0016\u0010\u0019\u001a\u00020\u00148\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0018\u0010\u0016R\u0016\u0010\u001d\u001a\u00020\u001a8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001b\u0010\u001cR$\u0010\"\u001a\u0010\u0012\u0004\u0012\u00020\u001f\u0012\u0004\u0012\u00020\u0005\u0018\u00010\u001e8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b \u0010!¨\u0006&"}, d2 = {"Lcom/vinfast/companion/main/ui/climate/dialog/SeatVentilationBottomSheetDialogFragment;", "Lcom/vinfast/companion/core/base/ui/widget/bottomsheet/BaseBottomSheetDialogFragment;", "Lcom/vinfast/remotecontrols/databinding/FragmentSeatVentilationBottomSheetDialogBinding;", "<init>", "()V", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "d1", "c1", "Lcom/vinfast/companion/main/ui/climate/dialog/SeatVentilationBottomSheetDialogFragment$Seat;", "seat", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "heating", "e1", "(Lcom/vinfast/companion/main/ui/climate/dialog/SeatVentilationBottomSheetDialogFragment$Seat;Z)V", "p1", "s0", "r0", "p", "Z", "useRHD", "Lcom/vinfast/companion/remotecontrolskit/persitent/model/seatventilation/ClimateSeatState;", "q", "Lcom/vinfast/companion/remotecontrolskit/persitent/model/seatventilation/ClimateSeatState;", "initialState", "r", "draftState", "Lcom/vinfast/companion/vehiclekit/data/persistent/model/vehicle/SeatVentilationSupport;", "s", "Lcom/vinfast/companion/vehiclekit/data/persistent/model/vehicle/SeatVentilationSupport;", "isSupported", "Lkotlin/Function1;", "Lcom/vinfast/companion/remotecontrolskit/persitent/model/seatventilation/ClimateSeatControl;", "t", "Lkotlin/jvm/functions/Function1;", "onSaveClick", "u", "Seat", "Companion", "remoteControls_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
@dagger.hilt.android.AndroidEntryPoint
public final class SeatVentilationBottomSheetDialogFragment extends com.vinfast.companion.main.ui.climate.dialog.Hilt_SeatVentilationBottomSheetDialogFragment<com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding> {

    /* JADX INFO: renamed from: u, reason: from kotlin metadata */
    public static final com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Companion INSTANCE = new com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Companion(null);

    /* JADX INFO: renamed from: p, reason: from kotlin metadata */
    private boolean useRHD;

    /* JADX INFO: renamed from: q, reason: from kotlin metadata */
    private com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState initialState;

    /* JADX INFO: renamed from: r, reason: from kotlin metadata */
    private com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState draftState;

    /* JADX INFO: renamed from: s, reason: from kotlin metadata */
    private com.vinfast.companion.vehiclekit.data.persistent.model.vehicle.SeatVentilationSupport isSupported;

    /* JADX INFO: renamed from: t, reason: from kotlin metadata */
    private kotlin.jvm.functions.Function1 onSaveClick;

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003JA\u0010\u0010\u001a\u00020\u000e2\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\n2\u0012\u0010\u000f\u001a\u000e\u0012\u0004\u0012\u00020\r\u0012\u0004\u0012\u00020\u000e0\f¢\u0006\u0004\b\u0010\u0010\u0011R\u0014\u0010\u0013\u001a\u00020\u00128\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0013\u0010\u0014¨\u0006\u0015"}, d2 = {"Lcom/vinfast/companion/main/ui/climate/dialog/SeatVentilationBottomSheetDialogFragment$Companion;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "<init>", "()V", "Landroidx/fragment/app/FragmentManager;", "manager", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "useRHD", "Lcom/vinfast/companion/remotecontrolskit/persitent/model/seatventilation/ClimateSeatState;", "state", "Lcom/vinfast/companion/vehiclekit/data/persistent/model/vehicle/SeatVentilationSupport;", "isSupported", "Lkotlin/Function1;", "Lcom/vinfast/companion/remotecontrolskit/persitent/model/seatventilation/ClimateSeatControl;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "onSaveClick", "a", "(Landroidx/fragment/app/FragmentManager;ZLcom/vinfast/companion/remotecontrolskit/persitent/model/seatventilation/ClimateSeatState;Lcom/vinfast/companion/vehiclekit/data/persistent/model/vehicle/SeatVentilationSupport;Lkotlin/jvm/functions/Function1;)V", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "TAG", "Ljava/lang/String;", "remoteControls_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
    public static final class Companion {
        public /* synthetic */ Companion(kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final void a(androidx.fragment.app.FragmentManager manager, boolean useRHD, com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState state, com.vinfast.companion.vehiclekit.data.persistent.model.vehicle.SeatVentilationSupport isSupported, kotlin.jvm.functions.Function1 onSaveClick) {
            kotlin.jvm.internal.Intrinsics.l(manager, "manager");
            kotlin.jvm.internal.Intrinsics.l(state, "state");
            kotlin.jvm.internal.Intrinsics.l(isSupported, "isSupported");
            kotlin.jvm.internal.Intrinsics.l(onSaveClick, "onSaveClick");
            com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment = new com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment();
            seatVentilationBottomSheetDialogFragment.F0(false);
            seatVentilationBottomSheetDialogFragment.useRHD = useRHD;
            seatVentilationBottomSheetDialogFragment.initialState = state;
            seatVentilationBottomSheetDialogFragment.draftState = state;
            seatVentilationBottomSheetDialogFragment.isSupported = isSupported;
            seatVentilationBottomSheetDialogFragment.onSaveClick = onSaveClick;
            seatVentilationBottomSheetDialogFragment.show(manager, "SeatVentilationBottomSheetDialogFragment");
        }

        private Companion() {
        }
    }

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0007\b\u0082\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003j\u0002\b\u0004j\u0002\b\u0005j\u0002\b\u0006j\u0002\b\u0007¨\u0006\b"}, d2 = {"Lcom/vinfast/companion/main/ui/climate/dialog/SeatVentilationBottomSheetDialogFragment$Seat;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "<init>", "(Ljava/lang/String;I)V", "FRONT_LEFT", "FRONT_RIGHT", "REAR_LEFT", "REAR_RIGHT", "remoteControls_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
    private enum Seat {
        FRONT_LEFT,
        FRONT_RIGHT,
        REAR_LEFT,
        REAR_RIGHT;

        private static final /* synthetic */ kotlin.enums.EnumEntries $ENTRIES = kotlin.enums.EnumEntriesKt.a(values());

        @org.jetbrains.annotations.NotNull
        public static kotlin.enums.EnumEntries<com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat> getEntries() {
            return $ENTRIES;
        }
    }

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(k = 3, mv = {2, 2, 0}, xi = 48)
    public static final /* synthetic */ class WhenMappings {
        public static final /* synthetic */ int[] a;

        static {
            int[] iArr = new int[com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.values().length];
            try {
                iArr[com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.FRONT_LEFT.ordinal()] = 1;
            } catch (java.lang.NoSuchFieldError unused) {
            }
            try {
                iArr[com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.FRONT_RIGHT.ordinal()] = 2;
            } catch (java.lang.NoSuchFieldError unused2) {
            }
            try {
                iArr[com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.REAR_LEFT.ordinal()] = 3;
            } catch (java.lang.NoSuchFieldError unused3) {
            }
            try {
                iArr[com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.REAR_RIGHT.ordinal()] = 4;
            } catch (java.lang.NoSuchFieldError unused4) {
            }
            a = iArr;
        }
    }

    public SeatVentilationBottomSheetDialogFragment() {
        super(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.companion.main.ui.climate.dialog.q
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.W0((android.view.LayoutInflater) obj);
            }
        });
        com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState = new com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState((com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, 255, (kotlin.jvm.internal.DefaultConstructorMarker) null);
        this.initialState = climateSeatState;
        this.draftState = climateSeatState;
        this.isSupported = new com.vinfast.companion.vehiclekit.data.persistent.model.vehicle.SeatVentilationSupport(false, false, false, false, false, false, false, false, 255, (kotlin.jvm.internal.DefaultConstructorMarker) null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding W0(android.view.LayoutInflater layoutInflater) {
        kotlin.jvm.internal.Intrinsics.l(layoutInflater, "it");
        com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding fragmentSeatVentilationBottomSheetDialogBindingC = com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding.c(layoutInflater);
        kotlin.jvm.internal.Intrinsics.k(fragmentSeatVentilationBottomSheetDialogBindingC, "inflate(...)");
        return fragmentSeatVentilationBottomSheetDialogBindingC;
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    private final void c1() throws kotlin.NoWhenBranchMatchedException {
        com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding fragmentSeatVentilationBottomSheetDialogBindingN0 = n0();
        fragmentSeatVentilationBottomSheetDialogBindingN0.h.setState(this.draftState.getHeatFL());
        fragmentSeatVentilationBottomSheetDialogBindingN0.i.setState(this.draftState.getHeatFR());
        fragmentSeatVentilationBottomSheetDialogBindingN0.j.setState(this.draftState.getHeatRL());
        fragmentSeatVentilationBottomSheetDialogBindingN0.k.setState(this.draftState.getHeatRR());
        fragmentSeatVentilationBottomSheetDialogBindingN0.d.setState(this.draftState.getCoolFL());
        fragmentSeatVentilationBottomSheetDialogBindingN0.e.setState(this.draftState.getCoolFR());
        fragmentSeatVentilationBottomSheetDialogBindingN0.f.setState(this.draftState.getCoolRL());
        fragmentSeatVentilationBottomSheetDialogBindingN0.g.setState(this.draftState.getCoolRR());
    }

    private final void d1() {
        com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding fragmentSeatVentilationBottomSheetDialogBindingN0 = n0();
        if (this.useRHD) {
            android.widget.TextView textView = fragmentSeatVentilationBottomSheetDialogBindingN0.t;
            android.content.Context contextRequireContext = requireContext();
            kotlin.jvm.internal.Intrinsics.k(contextRequireContext, "requireContext(...)");
            textView.setText(com.vinfast.companion.core.managers.VFLocaleKt.a(contextRequireContext).getString(com.vinfast.remotecontrols.R.string.CA30201_passengers));
            android.widget.TextView textView2 = fragmentSeatVentilationBottomSheetDialogBindingN0.u;
            android.content.Context contextRequireContext2 = requireContext();
            kotlin.jvm.internal.Intrinsics.k(contextRequireContext2, "requireContext(...)");
            textView2.setText(com.vinfast.companion.core.managers.VFLocaleKt.a(contextRequireContext2).getString(com.vinfast.remotecontrols.R.string.common_role_driver));
        } else {
            android.widget.TextView textView3 = fragmentSeatVentilationBottomSheetDialogBindingN0.t;
            android.content.Context contextRequireContext3 = requireContext();
            kotlin.jvm.internal.Intrinsics.k(contextRequireContext3, "requireContext(...)");
            textView3.setText(com.vinfast.companion.core.managers.VFLocaleKt.a(contextRequireContext3).getString(com.vinfast.remotecontrols.R.string.common_role_driver));
            android.widget.TextView textView4 = fragmentSeatVentilationBottomSheetDialogBindingN0.u;
            android.content.Context contextRequireContext4 = requireContext();
            kotlin.jvm.internal.Intrinsics.k(contextRequireContext4, "requireContext(...)");
            textView4.setText(com.vinfast.companion.core.managers.VFLocaleKt.a(contextRequireContext4).getString(com.vinfast.remotecontrols.R.string.CA30201_passengers));
        }
        android.widget.LinearLayout linearLayout = fragmentSeatVentilationBottomSheetDialogBindingN0.n;
        kotlin.jvm.internal.Intrinsics.k(linearLayout, "llFrontSeats");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(linearLayout, this.isSupported.h());
        android.widget.LinearLayout linearLayout2 = fragmentSeatVentilationBottomSheetDialogBindingN0.r;
        kotlin.jvm.internal.Intrinsics.k(linearLayout2, "llRearSeats");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(linearLayout2, this.isSupported.o());
        android.widget.LinearLayout linearLayout3 = fragmentSeatVentilationBottomSheetDialogBindingN0.m;
        kotlin.jvm.internal.Intrinsics.k(linearLayout3, "llDriverSeat");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(linearLayout3, this.isSupported.f());
        android.widget.LinearLayout linearLayout4 = fragmentSeatVentilationBottomSheetDialogBindingN0.o;
        kotlin.jvm.internal.Intrinsics.k(linearLayout4, "llPassengerSeat");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(linearLayout4, this.isSupported.g());
        android.widget.LinearLayout linearLayout5 = fragmentSeatVentilationBottomSheetDialogBindingN0.p;
        kotlin.jvm.internal.Intrinsics.k(linearLayout5, "llRearLeftSeat");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(linearLayout5, this.isSupported.m());
        android.widget.LinearLayout linearLayout6 = fragmentSeatVentilationBottomSheetDialogBindingN0.q;
        kotlin.jvm.internal.Intrinsics.k(linearLayout6, "llRearRightSeat");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(linearLayout6, this.isSupported.n());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView = fragmentSeatVentilationBottomSheetDialogBindingN0.h;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView, "heatFL");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView, this.isSupported.i());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView2 = fragmentSeatVentilationBottomSheetDialogBindingN0.i;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView2, "heatFR");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView2, this.isSupported.j());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView3 = fragmentSeatVentilationBottomSheetDialogBindingN0.j;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView3, "heatRL");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView3, this.isSupported.k());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView4 = fragmentSeatVentilationBottomSheetDialogBindingN0.k;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView4, "heatRR");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView4, this.isSupported.l());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView5 = fragmentSeatVentilationBottomSheetDialogBindingN0.d;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView5, "coolFL");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView5, this.isSupported.b());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView6 = fragmentSeatVentilationBottomSheetDialogBindingN0.e;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView6, "coolFR");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView6, this.isSupported.c());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView7 = fragmentSeatVentilationBottomSheetDialogBindingN0.f;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView7, "coolRL");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView7, this.isSupported.d());
        com.vinfast.companion.main.ui.climate.seatventilation.SeatVentilationBigView seatVentilationBigView8 = fragmentSeatVentilationBottomSheetDialogBindingN0.g;
        kotlin.jvm.internal.Intrinsics.k(seatVentilationBigView8, "coolRR");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(seatVentilationBigView8, this.isSupported.e());
        android.view.View view = fragmentSeatVentilationBottomSheetDialogBindingN0.l;
        kotlin.jvm.internal.Intrinsics.k(view, "heatingDivider");
        com.vinfast.companion.core.extensions.ViewExtensionKt.T(view, this.isSupported.h() && this.isSupported.o());
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    private final void e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat seat, boolean heating) throws kotlin.NoWhenBranchMatchedException {
        com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState heatFL;
        com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatStateCopy$default;
        int[] iArr = com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.WhenMappings.a;
        int i = iArr[seat.ordinal()];
        if (i == 1) {
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState = this.draftState;
            heatFL = heating ? climateSeatState.getHeatFL() : climateSeatState.getCoolFL();
        } else if (i == 2) {
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState2 = this.draftState;
            heatFL = heating ? climateSeatState2.getHeatFR() : climateSeatState2.getCoolFR();
        } else if (i == 3) {
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState3 = this.draftState;
            heatFL = heating ? climateSeatState3.getHeatRL() : climateSeatState3.getCoolRL();
        } else {
            if (i != 4) {
                throw new kotlin.NoWhenBranchMatchedException();
            }
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState4 = this.draftState;
            heatFL = heating ? climateSeatState4.getHeatRR() : climateSeatState4.getCoolRR();
        }
        com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState nextState = heatFL.getNextState();
        int i2 = iArr[seat.ordinal()];
        if (i2 == 1) {
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState seatState = nextState;
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState5 = this.draftState;
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState seatState2 = heating ? seatState : com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.HEAT_OFF;
            if (heating) {
                seatState = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.COOL_OFF;
            }
            climateSeatStateCopy$default = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState.copy$default(climateSeatState5, seatState2, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, seatState, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, 238, (java.lang.Object) null);
        } else if (i2 == 2) {
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState seatState3 = nextState;
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState6 = this.draftState;
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState seatState4 = heating ? seatState3 : com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.HEAT_OFF;
            if (heating) {
                seatState3 = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.COOL_OFF;
            }
            climateSeatStateCopy$default = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState.copy$default(climateSeatState6, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, seatState4, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, seatState3, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, 221, (java.lang.Object) null);
        } else if (i2 == 3) {
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState7 = this.draftState;
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState seatState5 = heating ? nextState : com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.HEAT_OFF;
            if (heating) {
                nextState = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.COOL_OFF;
            }
            climateSeatStateCopy$default = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState.copy$default(climateSeatState7, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, seatState5, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, nextState, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, 187, (java.lang.Object) null);
        } else {
            if (i2 != 4) {
                throw new kotlin.NoWhenBranchMatchedException();
            }
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState climateSeatState8 = this.draftState;
            com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState seatState6 = heating ? nextState : com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.HEAT_OFF;
            if (heating) {
                nextState = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState.COOL_OFF;
            }
            climateSeatStateCopy$default = com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ClimateSeatState.copy$default(climateSeatState8, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, seatState6, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, (com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.SeatState) null, nextState, 119, (java.lang.Object) null);
        }
        this.draftState = climateSeatStateCopy$default;
        c1();
        p1();
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void f1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.FRONT_LEFT, true);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void g1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.FRONT_RIGHT, true);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void h1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.REAR_LEFT, true);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void i1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.REAR_RIGHT, true);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void j1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.FRONT_LEFT, false);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void k1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.FRONT_RIGHT, false);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void l1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.REAR_LEFT, false);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final void m1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        seatVentilationBottomSheetDialogFragment.e1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.Seat.REAR_RIGHT, false);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit n1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.l(view, "it");
        kotlin.jvm.functions.Function1 function1 = seatVentilationBottomSheetDialogFragment.onSaveClick;
        if (function1 != null) {
            function1.invoke(com.vinfast.companion.remotecontrolskit.persitent.model.seatventilation.ConvertUtilsKt.toChangedControl(seatVentilationBottomSheetDialogFragment.draftState, seatVentilationBottomSheetDialogFragment.initialState));
        }
        seatVentilationBottomSheetDialogFragment.dismiss();
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit o1(com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment seatVentilationBottomSheetDialogFragment, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.l(view, "it");
        seatVentilationBottomSheetDialogFragment.dismiss();
        return kotlin.Unit.a;
    }

    private final void p1() {
        n0().c.setEnabled(!kotlin.jvm.internal.Intrinsics.g(this.draftState, this.initialState));
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public void s0() throws kotlin.NoWhenBranchMatchedException {
        com.vinfast.remotecontrols.databinding.FragmentSeatVentilationBottomSheetDialogBinding fragmentSeatVentilationBottomSheetDialogBindingN0 = n0();
        d1();
        c1();
        p1();
        fragmentSeatVentilationBottomSheetDialogBindingN0.h.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.s
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.f1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.i.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.t
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.g1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.j.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.u
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.h1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.k.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.v
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.i1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.d.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.w
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.j1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.e.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.x
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.k1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.f.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.y
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.l1(this.a, view);
            }
        });
        fragmentSeatVentilationBottomSheetDialogBindingN0.g.setOnClickListener(new android.view.View.OnClickListener() { // from class: com.vinfast.companion.main.ui.climate.dialog.z
            /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
            @Override // android.view.View.OnClickListener
            public final void onClick(android.view.View view) throws kotlin.NoWhenBranchMatchedException {
                com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.m1(this.a, view);
            }
        });
        androidx.appcompat.widget.AppCompatTextView appCompatTextView = fragmentSeatVentilationBottomSheetDialogBindingN0.c;
        kotlin.jvm.internal.Intrinsics.k(appCompatTextView, "btnSave");
        com.vinfast.companion.core.extensions.ViewExtensionKt.G(appCompatTextView, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.companion.main.ui.climate.dialog.a0
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.n1(this.a, (android.view.View) obj);
            }
        });
        androidx.appcompat.widget.AppCompatTextView appCompatTextView2 = fragmentSeatVentilationBottomSheetDialogBindingN0.b;
        kotlin.jvm.internal.Intrinsics.k(appCompatTextView2, "btnCancel");
        com.vinfast.companion.core.extensions.ViewExtensionKt.G(appCompatTextView2, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.companion.main.ui.climate.dialog.r
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.companion.main.ui.climate.dialog.SeatVentilationBottomSheetDialogFragment.o1(this.a, (android.view.View) obj);
            }
        });
    }

    public void r0() {
    }
}
