package com.ss.android.ugc.aweme.deeplink.actions;

import X.0HH;
import X.AnonymousClass3PS;
import X.C03012Pr;
import X.Cwu;
import X.LeS;
import X.Lyq;
import X.M12;
import android.net.Uri;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Objects;
import kotlin.h.b.n;

public final class FeedAction extends AnonymousClass3PS<C03012Pr> {
    static {
        Covode.recordClassIndex(63413);
    }

    public final ArrayList<Integer> getFlags() {
        return LeS.LIZLLL(new Integer[]{67108864, 268435456});
    }

    public final Cwu<String, HashMap<String, Object>> buildInnerUrl(String str, HashMap<String, Object> hashMap) {
        boolean z;
        M12.LIZ(str, hashMap);
        HashMap hashMap2 = new HashMap();
        Uri parse = Uri.parse(str);
        String queryParameter = parse.getQueryParameter("is_from_notification");
        if (queryParameter != null) {
            Objects.requireNonNull(queryParameter, "null cannot be cast to non-null type kotlin.Boolean");
            z = ((Boolean) queryParameter).booleanValue();
        } else {
            z = false;
        }
        String queryParameter2 = parse.getQueryParameter("tab");
        if (queryParameter2 == null) {
            queryParameter2 = "";
        }
        n.LIZIZ(queryParameter2, "");
        try {
            int parseInt = Integer.parseInt(queryParameter2);
            hashMap2.put("tab", Integer.valueOf(parseInt));
            if (parseInt == 1) {
                Lyq.LIZ.LIZ("homepage_hot", parse, z);
            } else if (parseInt == 2) {
                Lyq.LIZ.LIZ("homepage_fresh", parse, z);
            }
        } catch (Exception e) {
            0HH.LIZ(e);
        }
        hashMap2.put("com.ss.android.ugc.aweme.intent.extra.EXTRA_AWEME_PUSH_TAB", "HOME");
        return new Cwu<>("aweme://main", hashMap2);
    }
}
