package com.ss.android.ugc.aweme.canvas.guide;

import X.0CB;
import X.0CH;
import X.0CN;
import X.1Bn;
import X.1hK;
import X.2cN;
import X.7hc;
import X.7he;
import X.C05955Jx;
import X.C31126Is;
import X.Crj;
import X.M12;
import X.QJv;
import android.view.View;
import com.bytedance.covode.number.Covode;

public final class CanvasGestureGuideWidget {
    public 2cN LIZ;
    public final 1hK LIZIZ;
    public final QJv LIZJ;
    public final View LIZLLL;
    public final Crj LJ = 7he.LIZ(7hc.NONE, new C05955Jx(this));

    static {
        Covode.recordClassIndex(55451);
    }

    public final 1Bn<Boolean> LIZ() {
        return (1Bn) this.LJ.getValue();
    }

    public final class CanvasGestureGuideObserver implements C31126Is {
        static {
            Covode.recordClassIndex(55452);
        }

        public final void onStateChanged(0CH r2, 0CB r3) {
            if (r3 == 0CB.ON_DESTROY) {
                onDestroy();
            }
        }

        @0CN(LIZ = 0CB.ON_DESTROY)
        public final void onDestroy() {
            2cN r0 = CanvasGestureGuideWidget.this.LIZ;
            if (r0 != null) {
                r0.dispose();
            }
            CanvasGestureGuideWidget.this.LIZIZ.getLifecycle().LIZIZ(this);
        }

        public CanvasGestureGuideObserver() {
        }
    }

    public CanvasGestureGuideWidget(1hK r3, QJv qJv, View view) {
        M12.LIZ(r3);
        this.LIZIZ = r3;
        this.LIZJ = qJv;
        this.LIZLLL = view;
    }
}
