package com.ss.android.ugc.aweme.profile.ui.v2;

import X.0CB;
import X.0CH;
import X.1hT;
import X.2sG;
import X.2up;
import X.C1490Ad4;
import X.CxE;
import X.M12;
import androidx.fragment.app.Fragment;
import com.bytedance.assem.arch.core.Assembler;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import kotlin.h.b.n;

public final class I18nUserProfileFragmentV2$setEventType$$inlined$setAssemServiceState$1 implements 1hT {
    public final /* synthetic */ 2sG LIZ;
    public final /* synthetic */ Fragment LIZIZ;
    public final /* synthetic */ Assembler LIZJ;

    static {
        Covode.recordClassIndex(99407);
    }

    public I18nUserProfileFragmentV2$setEventType$$inlined$setAssemServiceState$1(2sG r1, Fragment fragment, Assembler assembler) {
        this.LIZ = r1;
        this.LIZIZ = fragment;
        this.LIZJ = assembler;
    }

    public final void onStateChanged(0CH r11, 0CB r12) {
        M12.LIZ(r11, r12);
        if (C1490Ad4.LIZ[r12.ordinal()] == 1) {
            CxE cxE = (CxE) this.LIZ.element;
            2up r8 = this.LIZIZ;
            Class cls = r8.getClass();
            Class[] interfaces = cls.getInterfaces();
            if (interfaces != null && interfaces.length != 0) {
                while (cls != Object.class) {
                    Class[] interfaces2 = cls.getInterfaces();
                    M12.LIZ(interfaces2);
                    ArrayList<Class> arrayList = new ArrayList<>();
                    for (Class cls2 : interfaces2) {
                        if (2up.class.isAssignableFrom(cls2)) {
                            arrayList.add(cls2);
                        }
                    }
                    for (Class cls3 : arrayList) {
                        n.LIZIZ(cls3, "");
                        cxE.LIZIZ(cls3, r8);
                    }
                    cls = cls.getSuperclass();
                    if (cls == null) {
                        break;
                    }
                }
            }
            this.LIZJ.LIZLLL(this.LIZIZ);
        }
    }
}
