package com.ss.android.ugc.aweme.shortvideo.ui;

import X.0CH;
import X.0HH;
import X.DVG;
import X.FR1;
import X.FRM;
import X.FRX;
import X.FTQ;
import X.M12;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.shortvideo.model.AddToPlaylistItemStatus;
import com.ss.android.ugc.aweme.shortvideo.ui.viewmodel.VideoPublishViewModel;
import java.util.HashMap;
import kotlin.h.b.n;

public final class PublishSettingFullScreenPanelV2 extends PublishSettingFullScreenPanel {
    public static final FRM LIZLLL = new FRM((byte) 0);
    public FTQ LJ;
    public RelativeLayout LJFF;
    public HashMap LJI;

    static {
        Covode.recordClassIndex(112789);
    }

    public final void LIZ() {
        HashMap hashMap = this.LJI;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public final /* synthetic */ void onDestroyView() {
        super.onDestroyView();
        LIZ();
    }

    public final void LIZ(View view) {
        boolean z;
        M12.LIZ(view);
        super.LIZ(view);
        Bundle arguments = getArguments();
        if (arguments != null) {
            z = arguments.getBoolean("key_added_to_playlist", false);
        } else {
            z = false;
        }
        VideoPublishViewModel LIZ = DVG.LIZ(requireActivity()).LIZ(VideoPublishViewModel.class);
        n.LIZIZ(LIZ, "");
        VideoPublishViewModel videoPublishViewModel = LIZ;
        FRX LIZJ = videoPublishViewModel.LIZJ();
        AddToPlaylistItemStatus LIZIZ = videoPublishViewModel.LIZIZ();
        FTQ ftq = (FTQ) view.findViewById(2131365276);
        this.LJ = ftq;
        if (ftq == null) {
            n.LIZIZ();
        }
        LIZJ.LIZ((0CH) this, ftq);
        if (FR1.LIZ() && z) {
            RelativeLayout relativeLayout = (RelativeLayout) view.findViewById(2131369062);
            this.LJFF = relativeLayout;
            if (relativeLayout == null) {
                n.LIZIZ();
            }
            LIZIZ.bindView(relativeLayout, this);
            RelativeLayout relativeLayout2 = this.LJFF;
            if (relativeLayout2 != null) {
                relativeLayout2.setVisibility(0);
            }
        }
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        M12.LIZ(layoutInflater);
        View LIZ = 0HH.LIZ(layoutInflater, 2131560442, viewGroup, false);
        n.LIZIZ(LIZ, "");
        LIZ(LIZ);
        return LIZ;
    }
}
