package com.ss.android.ugc.aweme.im.sdk.chat.data.model;

import X.9EH;
import X.J7F;
import X.M12;
import android.os.Bundle;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import com.ss.android.ugc.aweme.base.model.UrlModel;
import com.ss.android.ugc.aweme.share.improve.pkg.CommentSharePackage;
import com.ss.android.ugc.aweme.sharer.ui.SharePackage;

public class CommentContent extends BaseContent {
    @c(LIZ = "author_id")
    public String authorId;
    @c(LIZ = "author_name")
    public String authorName;
    @c(LIZ = "avatar_url")
    public UrlModel avatarUrl;
    @c(LIZ = "aweme_id")
    public String awemeId;
    @c(LIZ = "aweme_type")
    public int awemeType;
    @c(LIZ = "comment")
    public String comment;
    @c(LIZ = "comment_id")
    public String commentId;
    @c(LIZ = "cover_url")
    public UrlModel coverUrl;
    @c(LIZ = "is_reply_with_video")
    public boolean isReplyWithVideo;
    @c(LIZ = "is_sub_comment")
    public boolean isSubComment;
    @c(LIZ = "reply_user_id")
    public String replyUserId;
    @c(LIZ = "reply_user_name")
    public String replyUserName;

    static {
        Covode.recordClassIndex(84084);
    }

    public String getAuthorId() {
        return this.authorId;
    }

    public String getAuthorName() {
        return this.authorName;
    }

    public UrlModel getAvatarUrl() {
        return this.avatarUrl;
    }

    public String getAwemeId() {
        return this.awemeId;
    }

    public int getAwemeType() {
        return this.awemeType;
    }

    public String getComment() {
        return this.comment;
    }

    public String getCommentId() {
        return this.commentId;
    }

    public UrlModel getCoverUrl() {
        return this.coverUrl;
    }

    public String getReplyUserId() {
        return this.replyUserId;
    }

    public String getReplyUserName() {
        return this.replyUserName;
    }

    public boolean isReplyWithVideo() {
        return this.isReplyWithVideo;
    }

    public boolean isSubComment() {
        return this.isSubComment;
    }

    public String getMsgHint() {
        return 9EH.LJJIFFI.LIZ().getResources().getString(2131825703, new Object[]{this.authorName});
    }

    public SharePackage generateSharePackage() {
        String str;
        String str2;
        String str3;
        String awemeId2 = getAwemeId();
        UrlModel coverUrl2 = getCoverUrl();
        int awemeType2 = getAwemeType();
        String commentId2 = getCommentId();
        String comment2 = getComment();
        String authorName2 = getAuthorName();
        String authorId2 = getAuthorId();
        String replyUserName2 = getReplyUserName();
        String replyUserId2 = getReplyUserId();
        UrlModel avatarUrl2 = getAvatarUrl();
        boolean isSubComment2 = isSubComment();
        boolean isReplyWithVideo2 = isReplyWithVideo();
        M12.LIZ(coverUrl2, avatarUrl2);
        J7F j7f = new J7F();
        j7f.LIZ("comment");
        if (commentId2 == null) {
            str = "";
        } else {
            str = commentId2;
        }
        j7f.LIZIZ(str);
        if (commentId2 == null) {
            str2 = "";
        } else {
            str2 = commentId2;
        }
        j7f.LIZJ(str2);
        if (comment2 == null) {
            str3 = "";
        } else {
            str3 = comment2;
        }
        j7f.LIZLLL(str3);
        j7f.LJ("");
        CommentSharePackage commentSharePackage = new CommentSharePackage(j7f);
        Bundle bundle = commentSharePackage.LJIILJJIL;
        if (awemeId2 == null) {
            awemeId2 = "";
        }
        bundle.putString("aweme_id", awemeId2);
        if (comment2 == null) {
            comment2 = "";
        }
        bundle.putString("comment_text", comment2);
        if (commentId2 == null) {
            commentId2 = "";
        }
        bundle.putString("comment_id", commentId2);
        if (authorName2 == null) {
            authorName2 = "";
        }
        bundle.putString("comment_author_name", authorName2);
        if (authorId2 == null) {
            authorId2 = "";
        }
        bundle.putString("comment_author_id", authorId2);
        if (replyUserName2 == null) {
            replyUserName2 = "";
        }
        bundle.putString("comment_reply_user_name", replyUserName2);
        if (replyUserId2 == null) {
            replyUserId2 = "";
        }
        bundle.putString("comment_reply_user_id", replyUserId2);
        bundle.putSerializable("video_cover", coverUrl2);
        bundle.putSerializable("comment_author_avatar_url", avatarUrl2);
        bundle.putInt("aweme_type", awemeType2);
        bundle.putBoolean("comment_is_sub_comment", isSubComment2);
        bundle.putBoolean("comment_is_reply_with_video", isReplyWithVideo2);
        return commentSharePackage;
    }

    public void setAuthorId(String str) {
        this.authorId = str;
    }

    public void setAuthorName(String str) {
        this.authorName = str;
    }

    public void setAvatarUrl(UrlModel urlModel) {
        this.avatarUrl = urlModel;
    }

    public void setAwemeId(String str) {
        this.awemeId = str;
    }

    public void setAwemeType(int i) {
        this.awemeType = i;
    }

    public void setComment(String str) {
        this.comment = str;
    }

    public void setCommentId(String str) {
        this.commentId = str;
    }

    public void setCoverUrl(UrlModel urlModel) {
        this.coverUrl = urlModel;
    }

    public void setReplyUserId(String str) {
        this.replyUserId = str;
    }

    public void setReplyUserName(String str) {
        this.replyUserName = str;
    }

    public void setReplyWithVideo(boolean z) {
        this.isReplyWithVideo = z;
    }

    public void setSubComment(boolean z) {
        this.isSubComment = z;
    }

    public static CommentContent fromSharePackage(SharePackage sharePackage) {
        CommentContent commentContent = new CommentContent();
        Bundle bundle = sharePackage.LJIILJJIL;
        commentContent.setAwemeId(bundle.getString("aweme_id"));
        commentContent.setComment(bundle.getString("comment_text"));
        commentContent.setCommentId(bundle.getString("comment_id"));
        commentContent.setAuthorName(bundle.getString("comment_author_name"));
        commentContent.setAuthorId(bundle.getString("comment_author_id"));
        commentContent.setReplyUserName(bundle.getString("comment_reply_user_name"));
        commentContent.setReplyUserId(bundle.getString("comment_reply_user_id"));
        commentContent.setCoverUrl(bundle.getSerializable("video_cover"));
        commentContent.setAvatarUrl(bundle.getSerializable("comment_author_avatar_url"));
        commentContent.setAwemeType(bundle.getInt("aweme_type"));
        commentContent.setSubComment(bundle.getBoolean("comment_is_sub_comment"));
        commentContent.setReplyWithVideo(bundle.getBoolean("comment_is_reply_with_video"));
        commentContent.setType(0);
        return commentContent;
    }

    public String wrapMsgHint(boolean z, boolean z2, String str) {
        return 9EH.LJJIFFI.LIZ().getResources().getString(2131825708);
    }
}
