package com.ss.android.ugc.aweme.im.sdk.common.ui.base;

import X.0CB;
import X.0CD;
import X.0CH;
import X.0CN;
import X.1Bk;
import X.6Is;
import X.7he;
import X.C2265IvQ;
import X.Crj;
import com.bytedance.covode.number.Covode;

public class Widget implements 0CH, 6Is {
    public boolean LIZ;
    public final Crj LIZIZ = 7he.LIZ(new C2265IvQ(this));

    static {
        Covode.recordClassIndex(86297);
    }

    private final 1Bk LIZIZ() {
        return (1Bk) this.LIZIZ.getValue();
    }

    public void LIZ() {
        this.LIZ = true;
    }

    public void onStateChanged(0CH r2, 0CB r3) {
        if (r3 == 0CB.ON_CREATE) {
            create();
        } else if (r3 == 0CB.ON_START) {
            start();
        } else if (r3 == 0CB.ON_RESUME) {
            resume();
        } else if (r3 == 0CB.ON_PAUSE) {
            pause();
        } else if (r3 == 0CB.ON_STOP) {
            stop();
        } else if (r3 == 0CB.ON_DESTROY) {
            destroy();
        }
    }

    public 0CD getLifecycle() {
        return LIZIZ();
    }

    @0CN(LIZ = 0CB.ON_CREATE)
    public final void create() {
        this.LIZ = false;
        LIZIZ().LIZ(0CB.ON_CREATE);
    }

    @0CN(LIZ = 0CB.ON_DESTROY)
    public final void destroy() {
        LIZ();
        LIZIZ().LIZ(0CB.ON_DESTROY);
    }

    @0CN(LIZ = 0CB.ON_PAUSE)
    public final void pause() {
        LIZIZ().LIZ(0CB.ON_PAUSE);
    }

    @0CN(LIZ = 0CB.ON_RESUME)
    public final void resume() {
        LIZIZ().LIZ(0CB.ON_RESUME);
    }

    @0CN(LIZ = 0CB.ON_START)
    public final void start() {
        LIZIZ().LIZ(0CB.ON_START);
    }

    @0CN(LIZ = 0CB.ON_STOP)
    public final void stop() {
        LIZIZ().LIZ(0CB.ON_STOP);
    }
}
