package com.bytedance.android.livesdk.broadcast.preview.widget.cover;

import X.0CB;
import X.0CH;
import X.1Mn;
import X.6Is;
import X.7he;
import X.C1682GCd;
import X.Crj;
import X.GCT;
import X.GCV;
import X.GCW;
import X.M12;
import com.bytedance.android.livesdk.livesetting.broadcast.LiveBroadcastPreviewSetting;
import com.bytedance.android.livesdk.ui.BaseFragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.widgets.LiveWidget;

public final class PreviewCoverWidget extends LiveWidget implements 6Is {
    public C1682GCd LIZ;
    public final Crj LIZIZ = 7he.LIZ(GCW.LIZ);
    public final BaseFragment LIZJ;
    public final Crj LIZLLL = 7he.LIZ(GCV.LIZ);

    static {
        Covode.recordClassIndex(12372);
    }

    public final LiveWidget LIZ() {
        return (LiveWidget) this.LIZLLL.getValue();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final void onCreate() {
        super.onCreate();
        1Mn.LIZ.post(new GCT(this), this);
    }

    public final int getLayoutId() {
        if (LiveBroadcastPreviewSetting.INSTANCE.enableV1Style() || LiveBroadcastPreviewSetting.INSTANCE.enableV2Style()) {
            return 2131562215;
        }
        return 2131562214;
    }

    public final void onDestroy() {
        super.onDestroy();
        C1682GCd gCd = this.LIZ;
        if (gCd != null) {
            if (gCd.LIZLLL != null) {
                gCd.LIZLLL.LIZIZ();
                gCd.LIZLLL = null;
            }
            gCd.LJ = null;
        }
    }

    public PreviewCoverWidget(BaseFragment baseFragment) {
        M12.LIZ(baseFragment);
        this.LIZJ = baseFragment;
    }
}
