package Y5;

import A6.n;
import O6.p;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.domain.model.LatestVersion;
import com.martsnew.tv.R;
import com.martsnew.tv.ui.splash.TvSplashFragment;
import r5.C1508m;
import s5.DialogC1526e;
import y5.AbstractActivityC1764i;
import y5.C1763h;

/* JADX INFO: loaded from: classes.dex */
public final class c extends G6.i implements p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public /* synthetic */ Object f7322u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ TvSplashFragment f7323v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public c(E6.d dVar, TvSplashFragment tvSplashFragment) {
        super(2, dVar);
        this.f7323v = tvSplashFragment;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) throws Throwable {
        c cVar = (c) m((E6.d) obj2, (C1763h) obj);
        n nVar = n.f457a;
        cVar.p(nVar);
        return nVar;
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        c cVar = new c(dVar, this.f7323v);
        cVar.f7322u = obj;
        return cVar;
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        int iOrdinal;
        C1.N(obj);
        Object objA = ((C1763h) this.f7322u).a();
        if (objA != null && (iOrdinal = ((g) objA).ordinal()) != 0) {
            TvSplashFragment tvSplashFragment = this.f7323v;
            if (iOrdinal == 1) {
                tvSplashFragment.i0(R.id.goToWelcome);
            } else if (iOrdinal == 2) {
                tvSplashFragment.i0(R.id.goToMain);
            } else if (iOrdinal == 3) {
                LatestVersion latestVersion = tvSplashFragment.h0().f7344j;
                P6.g.e(latestVersion, "version");
                tvSplashFragment.j0(new C1508m(latestVersion));
            } else {
                if (iOrdinal != 4) {
                    throw new A6.b();
                }
                AbstractActivityC1764i abstractActivityC1764iM = tvSplashFragment.m();
                if (abstractActivityC1764iM != null) {
                    String strT = tvSplashFragment.t(R.string.title_could_not_load);
                    P6.g.d(strT, "getString(...)");
                    String strU = tvSplashFragment.u(R.string.description_could_not_load, tvSplashFragment.h0().f7346l);
                    P6.g.d(strU, "getString(...)");
                    String str = tvSplashFragment.h0().f7345k;
                    P6.g.e(str, "optionalLink");
                    b bVar = new b(abstractActivityC1764iM, 0);
                    String string = abstractActivityC1764iM.getResources().getString(R.string.title_close);
                    DialogC1526e dialogC1526e = new DialogC1526e(abstractActivityC1764iM);
                    dialogC1526e.f16890q = strT;
                    dialogC1526e.f16891r = strU;
                    dialogC1526e.f16892s = str;
                    dialogC1526e.f16893t = "";
                    dialogC1526e.f16894u = string;
                    dialogC1526e.f16895v = null;
                    dialogC1526e.f16896w = bVar;
                    dialogC1526e.show();
                }
            }
        }
        return n.f457a;
    }
}
