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 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.im.sdk.share.data.model.PureDataSharePackage;
import com.ss.android.ugc.aweme.sharer.ui.SharePackage;
import kotlin.h.b.n;

public final class ShareProductContent extends BaseContent {
    public static final Companion Companion = new Companion((2HN) null);
    @c(LIZ = "product_picture")
    public UrlModel picture;
    @c(LIZ = "product_price")
    public String price = "";
    @c(LIZ = "product_query_params")
    public String queryParams = "";
    @c(LIZ = "product_sales")
    public String sales = "";
    @c(LIZ = "seller_avatar")
    public UrlModel sellerAvatar;
    @c(LIZ = "seller_name")
    public String sellerName = "";
    @c(LIZ = "product_title")
    public String title = "";

    static {
        Covode.recordClassIndex(84127);
    }

    public static final ShareProductContent fromPackage(SharePackage sharePackage) {
        return Companion.fromPackage(sharePackage);
    }

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

        public Companion() {
        }

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

        public final ShareProductContent fromPackage(SharePackage sharePackage) {
            M12.LIZ(sharePackage);
            String string = sharePackage.LJIILJJIL.getString("product_title");
            String string2 = sharePackage.LJIILJJIL.getString("product_query_params");
            String string3 = sharePackage.LJIILJJIL.getString("product_price");
            String string4 = sharePackage.LJIILJJIL.getString("product_sales");
            UrlModel serializable = sharePackage.LJIILJJIL.getSerializable("product_picture");
            String string5 = sharePackage.LJIILJJIL.getString("seller_name");
            UrlModel serializable2 = sharePackage.LJIILJJIL.getSerializable("seller_avatar");
            ShareProductContent shareProductContent = new ShareProductContent();
            if (string != null) {
                shareProductContent.setTitle(string);
            }
            if (string2 != null) {
                shareProductContent.setQueryParams(string2);
            }
            if (string3 != null) {
                shareProductContent.setPrice(string3);
            }
            if (string4 != null) {
                shareProductContent.setSales(string4);
            }
            shareProductContent.setPicture(serializable);
            if (string5 != null) {
                shareProductContent.setSellerName(string5);
            }
            shareProductContent.setSellerAvatar(serializable2);
            return shareProductContent;
        }
    }

    public final UrlModel getPicture() {
        return this.picture;
    }

    public final String getPrice() {
        return this.price;
    }

    public final String getQueryParams() {
        return this.queryParams;
    }

    public final String getSales() {
        return this.sales;
    }

    public final UrlModel getSellerAvatar() {
        return this.sellerAvatar;
    }

    public final String getSellerName() {
        return this.sellerName;
    }

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

    public final SharePackage generateSharePackage() {
        SharePackage LIZ = PureDataSharePackage.LIZ.LIZ("product");
        LIZ.LJIILJJIL.putString("product_title", this.title);
        LIZ.LJIILJJIL.putString("product_price", this.price);
        LIZ.LJIILJJIL.putString("product_sales", this.sales);
        LIZ.LJIILJJIL.putString("product_query_params", this.queryParams);
        LIZ.LJIILJJIL.putSerializable("product_picture", this.picture);
        LIZ.LJIILJJIL.putString("seller_name", this.sellerName);
        LIZ.LJIILJJIL.putSerializable("seller_avatar", this.sellerAvatar);
        return LIZ;
    }

    public final void setPicture(UrlModel urlModel) {
        this.picture = urlModel;
    }

    public final void setSellerAvatar(UrlModel urlModel) {
        this.sellerAvatar = urlModel;
    }

    public final void setPrice(String str) {
        M12.LIZ(str);
        this.price = str;
    }

    public final void setQueryParams(String str) {
        M12.LIZ(str);
        this.queryParams = str;
    }

    public final void setSales(String str) {
        M12.LIZ(str);
        this.sales = str;
    }

    public final void setSellerName(String str) {
        M12.LIZ(str);
        this.sellerName = str;
    }

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

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

    public final String wrapMsgHint(boolean z, boolean z2, String str) {
        if (z || z2) {
            return 9EH.LJJIFFI.LIZ().getResources().getString(2131824353);
        }
        return 9EH.LJJIFFI.LIZ().getResources().getString(2131824352);
    }
}
