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

import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ReactionParams implements Parcelable, Serializable {
    public static final Parcelable.Creator<ReactionParams> CREATOR = new Parcelable.Creator<ReactionParams>() {
        static {
            Covode.recordClassIndex(112096);
        }

        public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
            return new ReactionParams[i];
        }

        public final /* synthetic */ Object createFromParcel(Parcel parcel) {
            return new ReactionParams(parcel);
        }
    };
    @c(LIZ = "non_reacted_video")
    public boolean nonReacted;
    @c(LIZ = "reaction_from_id")
    public String reactionFromId;
    @c(LIZ = "reaction_origin_id")
    public String reactionOriginId;
    @c(LIZ = "reaction_view_id")
    public String reactionViewId;
    @c(LIZ = "video_height")
    public int videoHeight;
    @c(LIZ = "video_path")
    public String videoPath;
    @c(LIZ = "video_width")
    public int videoWidth;
    @c(LIZ = "wav_path")
    public String wavPath;
    @c(LIZ = "react_shape_list")
    public List<CopiedReactionWindowInfo> windowInfoList = new ArrayList();

    public int describeContents() {
        return 0;
    }

    static {
        Covode.recordClassIndex(112095);
    }

    public ReactionParams() {
    }

    public boolean removeReactionWindowInfo() {
        if (this.windowInfoList.size() <= 0) {
            return false;
        }
        List<CopiedReactionWindowInfo> list = this.windowInfoList;
        list.remove(list.size() - 1);
        return true;
    }

    public void addReactionWindowInfo(CopiedReactionWindowInfo copiedReactionWindowInfo) {
        this.windowInfoList.add(copiedReactionWindowInfo);
    }

    public ReactionParams(Parcel parcel) {
        boolean z;
        this.videoPath = parcel.readString();
        this.wavPath = parcel.readString();
        this.videoWidth = parcel.readInt();
        this.videoHeight = parcel.readInt();
        this.reactionViewId = parcel.readString();
        this.reactionOriginId = parcel.readString();
        this.reactionFromId = parcel.readString();
        if (parcel.readByte() != 0) {
            z = true;
        } else {
            z = false;
        }
        this.nonReacted = z;
        this.windowInfoList = parcel.createTypedArrayList(CopiedReactionWindowInfo.CREATOR);
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.videoPath);
        parcel.writeString(this.wavPath);
        parcel.writeInt(this.videoWidth);
        parcel.writeInt(this.videoHeight);
        parcel.writeString(this.reactionViewId);
        parcel.writeString(this.reactionOriginId);
        parcel.writeString(this.reactionFromId);
        parcel.writeByte(this.nonReacted ? (byte) 1 : 0);
        parcel.writeTypedList(this.windowInfoList);
    }
}
