package ib;

import android.view.ContextThemeWrapper;
import android.view.MenuItem;
import android.view.View;
import android.widget.PopupMenu;

/* loaded from: classes4.dex */
public final class j implements v7.d {

    /* renamed from: p, reason: collision with root package name */
    private final String f22838p;

    /* renamed from: q, reason: collision with root package name */
    private final String f22839q;

    /* renamed from: r, reason: collision with root package name */
    private final dn.a f22840r;

    /* renamed from: s, reason: collision with root package name */
    private final dn.a f22841s;

    /* renamed from: t, reason: collision with root package name */
    private final dn.a f22842t;

    /* renamed from: u, reason: collision with root package name */
    private final int f22843u;

    public j(String nickName, String creationDateString, dn.a aVar, dn.a aVar2, dn.a aVar3) {
        kotlin.jvm.internal.t.g(nickName, "nickName");
        kotlin.jvm.internal.t.g(creationDateString, "creationDateString");
        this.f22838p = nickName;
        this.f22839q = creationDateString;
        this.f22840r = aVar;
        this.f22841s = aVar2;
        this.f22842t = aVar3;
        this.f22843u = y0.f23136r;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean h(j this$0, MenuItem menuItem) {
        kotlin.jvm.internal.t.g(this$0, "this$0");
        int itemId = menuItem.getItemId();
        if (itemId == x0.H) {
            dn.a aVar = this$0.f22841s;
            if (aVar == null) {
                return true;
            }
            aVar.invoke();
            return true;
        }
        if (itemId != x0.G) {
            return false;
        }
        dn.a aVar2 = this$0.f22842t;
        if (aVar2 == null) {
            return true;
        }
        aVar2.invoke();
        return true;
    }

    public final String d() {
        return this.f22839q;
    }

    public final String e() {
        return this.f22838p;
    }

    public final rm.n0 f() {
        dn.a aVar = this.f22840r;
        if (aVar == null) {
            return null;
        }
        aVar.invoke();
        return rm.n0.f34904a;
    }

    public final void g(View view) {
        kotlin.jvm.internal.t.g(view, "view");
        PopupMenu popupMenu = new PopupMenu(new ContextThemeWrapper(view.getContext(), c1.f22648b), view);
        popupMenu.inflate(z0.f23139a);
        popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { // from class: ib.i
            @Override // android.widget.PopupMenu.OnMenuItemClickListener
            public final boolean onMenuItemClick(MenuItem menuItem) {
                boolean h10;
                h10 = j.h(j.this, menuItem);
                return h10;
            }
        });
        popupMenu.show();
    }

    @Override // v7.d
    public int q() {
        return this.f22843u;
    }
}
