package com.google.android.material.tabs;

import java.lang.ref.WeakReference;

/* JADX INFO: loaded from: classes2.dex */
public final class i implements w3.h {

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

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

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

    public i(TabLayout tabLayout) {
        this.f23339a = new WeakReference(tabLayout);
    }

    @Override // w3.h
    public final void a(int i10) {
        this.f23340b = this.f23341c;
        this.f23341c = i10;
        TabLayout tabLayout = (TabLayout) this.f23339a.get();
        if (tabLayout != null) {
            tabLayout.f23319v0 = this.f23341c;
        }
    }

    @Override // w3.h
    public final void b(int i10, float f10) {
        TabLayout tabLayout = (TabLayout) this.f23339a.get();
        if (tabLayout != null) {
            int i11 = this.f23341c;
            tabLayout.h(i10, f10, i11 != 2 || this.f23340b == 1, (i11 == 2 && this.f23340b == 0) ? false : true, false);
        }
    }
}
