package o;

import android.view.WindowInsets;
import java.util.HashMap;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class S5 extends AbstractC0706aK implements OC {
    public final /* synthetic */ int m;
    public final /* synthetic */ Tj0 n;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ C2420sK f323o;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ S5(Tj0 tj0, C2420sK c2420sK, int i) {
        super(1);
        this.m = i;
        this.n = tj0;
        this.f323o = c2420sK;
    }

    @Override // o.OC
    public final Object g(Object obj) {
        WindowInsets windowInsetsF;
        switch (this.m) {
            case 0:
                InterfaceC1577jV interfaceC1577jV = (InterfaceC1577jV) obj;
                C2207q3 c2207q3 = interfaceC1577jV instanceof C2207q3 ? (C2207q3) interfaceC1577jV : null;
                Tj0 tj0 = this.n;
                if (c2207q3 != null) {
                    HashMap<Z5, C2420sK> holderToLayoutNode = c2207q3.getAndroidViewsHandler$ui_release().getHolderToLayoutNode();
                    C2420sK c2420sK = this.f323o;
                    holderToLayoutNode.put(tj0, c2420sK);
                    c2207q3.getAndroidViewsHandler$ui_release().addView(tj0);
                    c2207q3.getAndroidViewsHandler$ui_release().getLayoutNodeToHolder().put(c2420sK, tj0);
                    tj0.setImportantForAccessibility(1);
                    Oj0.m(tj0, new C1064e3(c2207q3, c2420sK, c2207q3));
                }
                if (tj0.getView().getParent() != tj0) {
                    tj0.addView(tj0.getView());
                }
                break;
            case 1:
                AbstractC0249Jp.l(this.n, this.f323o);
                break;
            default:
                C2420sK c2420sK2 = this.f323o;
                Tj0 tj02 = this.n;
                AbstractC0249Jp.l(tj02, c2420sK2);
                ((C2207q3) tj02.n).L = true;
                int[] iArr = tj02.y;
                int i = iArr[0];
                int i2 = iArr[1];
                tj02.getView().getLocationOnScreen(iArr);
                long j = tj02.z;
                long jK = ((InterfaceC1184fK) obj).K();
                tj02.z = jK;
                Kl0 kl0 = tj02.A;
                if (kl0 != null && ((i != iArr[0] || i2 != iArr[1] || !C1470iI.a(j, jK)) && (windowInsetsF = tj02.m(kl0).f()) != null)) {
                    tj02.getView().dispatchApplyWindowInsets(windowInsetsF);
                }
                break;
        }
        return Oh0.a;
    }
}
