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

import X.2HN;
import X.9EH;
import X.M12;
import android.content.Context;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import com.ss.android.ugc.aweme.im.sdk.share.data.model.PureDataSharePackage;
import com.ss.android.ugc.aweme.sharer.ui.SharePackage;
import kotlin.h.b.n;

public final class ShareSubscribeInviteContent extends BaseContent {
    public static final Companion Companion = new Companion((2HN) null);
    @c(LIZ = "desc")
    public String desc;
    @c(LIZ = "cover_url")
    public String image;
    @c(LIZ = "push_detail")
    public String pushDetail;
    @c(LIZ = "title")
    public String title;
    @c(LIZ = "link_url")
    public String url;

    static {
        Covode.recordClassIndex(84138);
    }

    public static final ShareSubscribeInviteContent fromSharePackage(SharePackage sharePackage) {
        return Companion.fromSharePackage(sharePackage);
    }

    public static final class Companion {
        static {
            Covode.recordClassIndex(84139);
        }

        public Companion() {
        }

        public /* synthetic */ Companion(2HN r1) {
            this();
        }

        public final ShareSubscribeInviteContent fromSharePackage(SharePackage sharePackage) {
            M12.LIZ(sharePackage);
            ShareSubscribeInviteContent shareSubscribeInviteContent = new ShareSubscribeInviteContent();
            shareSubscribeInviteContent.setTitle(sharePackage.LJIIJJI);
            shareSubscribeInviteContent.setDesc(sharePackage.LJIIL);
            shareSubscribeInviteContent.setImage(sharePackage.LJIILJJIL.getString("thumb_url"));
            String string = sharePackage.LJIILJJIL.getString("url_for_im_share");
            if (TextUtils.isEmpty(string)) {
                string = sharePackage.LJIILIIL;
            }
            shareSubscribeInviteContent.setUrl(string);
            shareSubscribeInviteContent.setPushDetail(sharePackage.LJIIJJI);
            return shareSubscribeInviteContent;
        }
    }

    public final String getDesc() {
        return this.desc;
    }

    public final String getImage() {
        return this.image;
    }

    public final String getPushDetail() {
        return this.pushDetail;
    }

    public final String getTitle() {
        return this.title;
    }

    public final String getUrl() {
        return this.url;
    }

    public final SharePackage generateSharePackage() {
        SharePackage LIZ = PureDataSharePackage.LIZ.LIZ("subscribe_invite");
        LIZ.LJIILJJIL.putSerializable("thumb_url", this.image);
        return LIZ;
    }

    public final String getMsgHint() {
        String string = 9EH.LJJIFFI.LIZ().getString(2131826033, new Object[]{this.title});
        n.LIZIZ(string, "");
        return string;
    }

    public final void setDesc(String str) {
        this.desc = str;
    }

    public final void setImage(String str) {
        this.image = str;
    }

    public final void setPushDetail(String str) {
        this.pushDetail = str;
    }

    public final void setTitle(String str) {
        this.title = str;
    }

    public final void setUrl(String str) {
        this.url = str;
    }

    public final String getQuoteHint(Context context) {
        M12.LIZ(context);
        String string = context.getResources().getString(2131825936);
        n.LIZIZ(string, "");
        return string;
    }

    public final String wrapMsgHint(boolean z, boolean z2, String str) {
        Context LIZ = 9EH.LJJIFFI.LIZ();
        if (z || z2) {
            String string = LIZ.getString(2131822398);
            n.LIZIZ(string, "");
            return string;
        }
        String string2 = LIZ.getString(2131832094);
        n.LIZIZ(string2, "");
        return string2;
    }
}
