package com.google.android.material.navigation;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.annotation.StyleRes;

/* JADX INFO: loaded from: classes2.dex */
@RestrictTo({RestrictTo.Scope.f556b})
public class NavigationBarSubheaderView extends FrameLayout implements h {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final TextView f22928a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f22929b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f22930c;

    @Nullable
    private k.r itemData;

    @Nullable
    private ColorStateList textColor;

    public NavigationBarSubheaderView(Context context) {
        super(context);
        LayoutInflater.from(context).inflate(x8.i.m3_navigation_menu_subheader, (ViewGroup) this, true);
        this.f22928a = (TextView) findViewById(x8.g.navigation_menu_subheader_label);
    }

    public final void a() {
        k.r rVar = this.itemData;
        if (rVar != null) {
            setVisibility((!rVar.isVisible() || (!this.f22929b && this.f22930c)) ? 8 : 0);
        }
    }

    @Override // k.c0
    public final void c(k.r rVar) {
        this.itemData = rVar;
        rVar.setCheckable(false);
        this.f22928a.setText(rVar.f28912e);
        a();
    }

    @Override // k.c0
    @Nullable
    public k.r getItemData() {
        return this.itemData;
    }

    public void setCheckable(boolean z10) {
    }

    public void setChecked(boolean z10) {
    }

    @Override // android.view.View
    public void setEnabled(boolean z10) {
    }

    @Override // com.google.android.material.navigation.h
    public void setExpanded(boolean z10) {
        this.f22929b = z10;
        a();
    }

    public void setIcon(@Nullable Drawable drawable) {
    }

    @Override // com.google.android.material.navigation.h
    public void setOnlyShowWhenExpanded(boolean z10) {
        this.f22930c = z10;
        a();
    }

    public void setShortcut(boolean z10, char c6) {
    }

    public void setTextAppearance(@StyleRes int i10) {
        TextView textView = this.f22928a;
        textView.setTextAppearance(i10);
        ColorStateList colorStateList = this.textColor;
        if (colorStateList != null) {
            textView.setTextColor(colorStateList);
        }
    }

    public void setTextColor(@Nullable ColorStateList colorStateList) {
        this.textColor = colorStateList;
        if (colorStateList != null) {
            this.f22928a.setTextColor(colorStateList);
        }
    }

    public void setTitle(@Nullable CharSequence charSequence) {
    }
}
