package j5;

import com.martsnew.data.model.response.HomeResponse;
import com.martsnew.domain.model.Shortcut;
import java.util.List;
import k5.C1104d;
import k5.C1105e;
import k5.C1106f;
import k5.C1107g;
import n4.u0;

/* JADX INFO: loaded from: classes.dex */
public final class n implements p {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final q f13706a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final t f13707b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final C1080k f13708c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final u f13709d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final C1076g f13710e;

    public n(q qVar, t tVar, C1080k c1080k, u uVar, C1076g c1076g) {
        P6.g.e(qVar, "movieMapper");
        P6.g.e(tVar, "shortcutMapper");
        P6.g.e(c1080k, "filterMapper");
        P6.g.e(uVar, "tabsMapper");
        P6.g.e(c1076g, "continueWatchMapper");
        this.f13706a = qVar;
        this.f13707b = tVar;
        this.f13708c = c1080k;
        this.f13709d = uVar;
        this.f13710e = c1076g;
    }

    @Override // j5.p
    public final Object a(Object obj) {
        String str;
        HomeResponse homeResponse = (HomeResponse) obj;
        P6.g.e(homeResponse, "dto");
        q qVar = this.f13706a;
        Integer num = homeResponse.f10794b;
        if (num != null && num.intValue() == 1) {
            qVar.getClass();
            return new C1107g(u0.u(qVar, homeResponse.f10797e));
        }
        C1080k c1080k = this.f13708c;
        List list = homeResponse.f10798f;
        String str2 = homeResponse.f10795c;
        String str3 = homeResponse.f10793a;
        if (num != null && num.intValue() == 3) {
            if (str3 == null) {
                str3 = "";
            }
            str = str2 != null ? str2 : "";
            c1080k.getClass();
            Shortcut shortcut = new Shortcut(str3, str, u0.u(c1080k, list));
            u uVar = this.f13709d;
            uVar.getClass();
            return new k5.h(shortcut, u0.u(uVar, homeResponse.f10800h));
        }
        if (num != null && num.intValue() == 2) {
            if (str3 == null) {
                str3 = "";
            }
            str = str2 != null ? str2 : "";
            c1080k.getClass();
            Shortcut shortcut2 = new Shortcut(str3, str, u0.u(c1080k, list));
            qVar.getClass();
            return new C1105e(shortcut2, u0.u(qVar, homeResponse.f10799g));
        }
        if (num == null || num.intValue() != 5) {
            t tVar = this.f13707b;
            tVar.getClass();
            return new C1106f(u0.u(tVar, homeResponse.f10796d));
        }
        if (str3 == null) {
            str3 = "";
        }
        Shortcut shortcut3 = new Shortcut(4, str3, str2 != null ? str2 : "");
        C1076g c1076g = this.f13710e;
        c1076g.getClass();
        return new C1104d(shortcut3, u0.u(c1076g, homeResponse.i));
    }
}
