package pe;

import android.app.Activity;
import android.view.View;
import androidx.fragment.app.f;
import kotlin.jvm.internal.t;
import l8.h;
import u8.n;
import w8.p0;

/* loaded from: classes4.dex */
public final class a implements p0 {

    /* renamed from: p, reason: collision with root package name */
    private final n f32615p = new n(null, 1, null);

    public void a(h hVar, f fVar) {
        p0.a.c(this, hVar, fVar);
    }

    @Override // w8.p0
    public void c(Activity activity, h.b event) {
        t.g(activity, "activity");
        t.g(event, "event");
    }

    @Override // w8.p0
    public void p(f fragment, h.b event) {
        t.g(fragment, "fragment");
        t.g(event, "event");
        if (event.b()) {
            View view = fragment.getView();
            if (view != null) {
                view.setVisibility(8);
            }
            this.f32615p.d(fragment.requireContext(), event.a());
            return;
        }
        View view2 = fragment.getView();
        if (view2 != null) {
            view2.setVisibility(0);
        }
        this.f32615p.c();
    }
}
