package com.google.android.material.appbar;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import androidx.coordinatorlayout.widget.CoordinatorLayout;

/* JADX INFO: compiled from: ViewOffsetBehavior.java */
/* JADX INFO: loaded from: classes.dex */
class c<V extends View> extends CoordinatorLayout.c<V> {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private d f3565a;

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

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

    public c() {
        this.f3566b = 0;
        this.f3567c = 0;
    }

    public int E() {
        d dVar = this.f3565a;
        if (dVar != null) {
            return dVar.b();
        }
        return 0;
    }

    protected void F(CoordinatorLayout coordinatorLayout, V v2, int i3) {
        coordinatorLayout.I(v2, i3);
    }

    public boolean G(int i3) {
        d dVar = this.f3565a;
        if (dVar != null) {
            return dVar.e(i3);
        }
        this.f3566b = i3;
        return false;
    }

    @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.c
    public boolean l(CoordinatorLayout coordinatorLayout, V v2, int i3) {
        F(coordinatorLayout, v2, i3);
        if (this.f3565a == null) {
            this.f3565a = new d(v2);
        }
        this.f3565a.c();
        this.f3565a.a();
        int i4 = this.f3566b;
        if (i4 != 0) {
            this.f3565a.e(i4);
            this.f3566b = 0;
        }
        int i5 = this.f3567c;
        if (i5 == 0) {
            return true;
        }
        this.f3565a.d(i5);
        this.f3567c = 0;
        return true;
    }

    public c(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.f3566b = 0;
        this.f3567c = 0;
    }
}
