package com.ss.android.ugc.aweme.main.homepageImpl;

import X.1hK;
import X.C29903aQ;
import X.C32513ed;
import X.C474046i;
import X.CqM;
import X.Ept;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.uikit.base.AbsFragment;
import com.ss.android.ugc.aweme.IAccountUserService;
import com.ss.android.ugc.aweme.homepage.api.ui.HomePageUIFrameService;
import com.ss.android.ugc.aweme.main.MainActivity;
import com.ss.android.ugc.aweme.main.TabChangeManager;
import kotlin.h.b.n;

public abstract class HomePageUIFrameServiceCommonImpl implements HomePageUIFrameService {
    static {
        Covode.recordClassIndex(91860);
    }

    public void setTitleTabVisibility(boolean z) {
        CqM.LIZ(new C32513ed(z, (byte) 0));
    }

    public void runInTabHostRunnable(AbsFragment absFragment) {
        M12.LIZ(absFragment);
        if (absFragment.aq_()) {
            1hK activity = absFragment.getActivity();
            if (!(activity instanceof MainActivity)) {
                activity = null;
            }
            MainActivity mainActivity = (MainActivity) activity;
            if (mainActivity != null) {
                mainActivity.refreshSlideSwitchCanScrollRight();
            }
        }
    }

    public String getTagForCurrentTabInMainPageFragment(TabChangeManager tabChangeManager, String str, String str2) {
        M12.LIZ(tabChangeManager);
        if (n.LIZ("NOTIFICATION", str2) || n.LIZ("USER", str2)) {
            IAccountUserService LJFF = C474046i.LJFF();
            n.LIZIZ(LJFF, "");
            if (!LJFF.isLogin()) {
                C29903aQ unloginSignUpUtils = Ept.LIZ.getUnloginSignUpUtils();
                if (str2 == null) {
                    str2 = "";
                }
                String LIZ = unloginSignUpUtils.LIZ(tabChangeManager, str2);
                if (LIZ == null) {
                    return "";
                }
                return LIZ;
            }
        }
        return str2;
    }
}
