package o;

import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.view.ActionProvider;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;

/* loaded from: classes.dex */
public class a implements n3.b {

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

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

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

    /* renamed from: d, reason: collision with root package name */
    private CharSequence f30392d;

    /* renamed from: e, reason: collision with root package name */
    private CharSequence f30393e;

    /* renamed from: f, reason: collision with root package name */
    private Intent f30394f;

    /* renamed from: g, reason: collision with root package name */
    private char f30395g;

    /* renamed from: i, reason: collision with root package name */
    private char f30397i;

    /* renamed from: k, reason: collision with root package name */
    private Drawable f30399k;

    /* renamed from: l, reason: collision with root package name */
    private Context f30400l;

    /* renamed from: m, reason: collision with root package name */
    private MenuItem.OnMenuItemClickListener f30401m;

    /* renamed from: n, reason: collision with root package name */
    private CharSequence f30402n;

    /* renamed from: o, reason: collision with root package name */
    private CharSequence f30403o;

    /* renamed from: h, reason: collision with root package name */
    private int f30396h = 4096;

    /* renamed from: j, reason: collision with root package name */
    private int f30398j = 4096;

    /* renamed from: p, reason: collision with root package name */
    private ColorStateList f30404p = null;

    /* renamed from: q, reason: collision with root package name */
    private PorterDuff.Mode f30405q = null;

    /* renamed from: r, reason: collision with root package name */
    private boolean f30406r = false;

    /* renamed from: s, reason: collision with root package name */
    private boolean f30407s = false;

    /* renamed from: t, reason: collision with root package name */
    private int f30408t = 16;

    public a(Context context, int i10, int i11, int i12, int i13, CharSequence charSequence) {
        this.f30400l = context;
        this.f30389a = i11;
        this.f30390b = i10;
        this.f30391c = i13;
        this.f30392d = charSequence;
    }

    private void c() {
        Drawable drawable = this.f30399k;
        if (drawable != null) {
            if (this.f30406r || this.f30407s) {
                Drawable l10 = androidx.core.graphics.drawable.a.l(drawable);
                this.f30399k = l10;
                Drawable mutate = l10.mutate();
                this.f30399k = mutate;
                if (this.f30406r) {
                    androidx.core.graphics.drawable.a.i(mutate, this.f30404p);
                }
                if (this.f30407s) {
                    androidx.core.graphics.drawable.a.j(this.f30399k, this.f30405q);
                }
            }
        }
    }

    @Override // n3.b
    public n3.b a(androidx.core.view.b bVar) {
        throw new UnsupportedOperationException();
    }

    @Override // n3.b
    public androidx.core.view.b b() {
        return null;
    }

    @Override // n3.b, android.view.MenuItem
    public boolean collapseActionView() {
        return false;
    }

    @Override // n3.b, android.view.MenuItem
    /* renamed from: d, reason: merged with bridge method [inline-methods] */
    public n3.b setActionView(int i10) {
        throw new UnsupportedOperationException();
    }

    @Override // n3.b, android.view.MenuItem
    /* renamed from: e, reason: merged with bridge method [inline-methods] */
    public n3.b setActionView(View view) {
        throw new UnsupportedOperationException();
    }

    @Override // n3.b, android.view.MenuItem
    public boolean expandActionView() {
        return false;
    }

    @Override // n3.b, android.view.MenuItem
    /* renamed from: f, reason: merged with bridge method [inline-methods] */
    public n3.b setShowAsActionFlags(int i10) {
        setShowAsAction(i10);
        return this;
    }

    @Override // android.view.MenuItem
    public ActionProvider getActionProvider() {
        throw new UnsupportedOperationException();
    }

    @Override // n3.b, android.view.MenuItem
    public View getActionView() {
        return null;
    }

    @Override // n3.b, android.view.MenuItem
    public int getAlphabeticModifiers() {
        return this.f30398j;
    }

    @Override // android.view.MenuItem
    public char getAlphabeticShortcut() {
        return this.f30397i;
    }

    @Override // n3.b, android.view.MenuItem
    public CharSequence getContentDescription() {
        return this.f30402n;
    }

    @Override // android.view.MenuItem
    public int getGroupId() {
        return this.f30390b;
    }

    @Override // android.view.MenuItem
    public Drawable getIcon() {
        return this.f30399k;
    }

    @Override // n3.b, android.view.MenuItem
    public ColorStateList getIconTintList() {
        return this.f30404p;
    }

    @Override // n3.b, android.view.MenuItem
    public PorterDuff.Mode getIconTintMode() {
        return this.f30405q;
    }

    @Override // android.view.MenuItem
    public Intent getIntent() {
        return this.f30394f;
    }

    @Override // android.view.MenuItem
    public int getItemId() {
        return this.f30389a;
    }

    @Override // android.view.MenuItem
    public ContextMenu.ContextMenuInfo getMenuInfo() {
        return null;
    }

    @Override // n3.b, android.view.MenuItem
    public int getNumericModifiers() {
        return this.f30396h;
    }

    @Override // android.view.MenuItem
    public char getNumericShortcut() {
        return this.f30395g;
    }

    @Override // android.view.MenuItem
    public int getOrder() {
        return this.f30391c;
    }

    @Override // android.view.MenuItem
    public SubMenu getSubMenu() {
        return null;
    }

    @Override // android.view.MenuItem
    public CharSequence getTitle() {
        return this.f30392d;
    }

    @Override // android.view.MenuItem
    public CharSequence getTitleCondensed() {
        CharSequence charSequence = this.f30393e;
        return charSequence != null ? charSequence : this.f30392d;
    }

    @Override // n3.b, android.view.MenuItem
    public CharSequence getTooltipText() {
        return this.f30403o;
    }

    @Override // android.view.MenuItem
    public boolean hasSubMenu() {
        return false;
    }

    @Override // n3.b, android.view.MenuItem
    public boolean isActionViewExpanded() {
        return false;
    }

    @Override // android.view.MenuItem
    public boolean isCheckable() {
        return (this.f30408t & 1) != 0;
    }

    @Override // android.view.MenuItem
    public boolean isChecked() {
        return (this.f30408t & 2) != 0;
    }

    @Override // android.view.MenuItem
    public boolean isEnabled() {
        return (this.f30408t & 16) != 0;
    }

    @Override // android.view.MenuItem
    public boolean isVisible() {
        return (this.f30408t & 8) == 0;
    }

    @Override // android.view.MenuItem
    public MenuItem setActionProvider(ActionProvider actionProvider) {
        throw new UnsupportedOperationException();
    }

    @Override // android.view.MenuItem
    public MenuItem setAlphabeticShortcut(char c10) {
        this.f30397i = Character.toLowerCase(c10);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setCheckable(boolean z10) {
        this.f30408t = (z10 ? 1 : 0) | (this.f30408t & (-2));
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setChecked(boolean z10) {
        this.f30408t = (z10 ? 2 : 0) | (this.f30408t & (-3));
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setEnabled(boolean z10) {
        this.f30408t = (z10 ? 16 : 0) | (this.f30408t & (-17));
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setIcon(Drawable drawable) {
        this.f30399k = drawable;
        c();
        return this;
    }

    @Override // n3.b, android.view.MenuItem
    public MenuItem setIconTintList(ColorStateList colorStateList) {
        this.f30404p = colorStateList;
        this.f30406r = true;
        c();
        return this;
    }

    @Override // n3.b, android.view.MenuItem
    public MenuItem setIconTintMode(PorterDuff.Mode mode) {
        this.f30405q = mode;
        this.f30407s = true;
        c();
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setIntent(Intent intent) {
        this.f30394f = intent;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setNumericShortcut(char c10) {
        this.f30395g = c10;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setOnActionExpandListener(MenuItem.OnActionExpandListener onActionExpandListener) {
        throw new UnsupportedOperationException();
    }

    @Override // android.view.MenuItem
    public MenuItem setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener onMenuItemClickListener) {
        this.f30401m = onMenuItemClickListener;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setShortcut(char c10, char c11) {
        this.f30395g = c10;
        this.f30397i = Character.toLowerCase(c11);
        return this;
    }

    @Override // n3.b, android.view.MenuItem
    public void setShowAsAction(int i10) {
    }

    @Override // android.view.MenuItem
    public MenuItem setTitle(CharSequence charSequence) {
        this.f30392d = charSequence;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setTitleCondensed(CharSequence charSequence) {
        this.f30393e = charSequence;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setVisible(boolean z10) {
        this.f30408t = (this.f30408t & 8) | (z10 ? 0 : 8);
        return this;
    }

    @Override // n3.b, android.view.MenuItem
    public MenuItem setAlphabeticShortcut(char c10, int i10) {
        this.f30397i = Character.toLowerCase(c10);
        this.f30398j = KeyEvent.normalizeMetaState(i10);
        return this;
    }

    @Override // android.view.MenuItem
    public n3.b setContentDescription(CharSequence charSequence) {
        this.f30402n = charSequence;
        return this;
    }

    @Override // n3.b, android.view.MenuItem
    public MenuItem setNumericShortcut(char c10, int i10) {
        this.f30395g = c10;
        this.f30396h = KeyEvent.normalizeMetaState(i10);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setTitle(int i10) {
        this.f30392d = this.f30400l.getResources().getString(i10);
        return this;
    }

    @Override // android.view.MenuItem
    public n3.b setTooltipText(CharSequence charSequence) {
        this.f30403o = charSequence;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setIcon(int i10) {
        this.f30399k = androidx.core.content.a.getDrawable(this.f30400l, i10);
        c();
        return this;
    }

    @Override // n3.b, android.view.MenuItem
    public MenuItem setShortcut(char c10, char c11, int i10, int i11) {
        this.f30395g = c10;
        this.f30396h = KeyEvent.normalizeMetaState(i10);
        this.f30397i = Character.toLowerCase(c11);
        this.f30398j = KeyEvent.normalizeMetaState(i11);
        return this;
    }
}
