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

import X.2HN;
import X.9EH;
import X.B8Q;
import X.M12;
import android.content.Context;
import android.os.Bundle;
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 java.io.Serializable;
import kotlin.h.b.n;

public final class GroupInviteCardContent extends BaseContent {
    public static final Companion Companion = new Companion((2HN) null);
    @c(LIZ = "expired_at")
    public Long expiredAt;
    @c(LIZ = "group")
    public B8Q group;
    @c(LIZ = "invite_id")
    public String inviteId;

    static {
        Covode.recordClassIndex(84093);
    }

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

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

        public Companion() {
        }

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

        public final GroupInviteCardContent fromSharePackage(SharePackage sharePackage) {
            M12.LIZ(sharePackage);
            GroupInviteCardContent groupInviteCardContent = new GroupInviteCardContent();
            groupInviteCardContent.type = 103301;
            Bundle bundle = sharePackage.LJIILJJIL;
            groupInviteCardContent.setInviteId(bundle.getString("invite_id"));
            groupInviteCardContent.setExpiredAt(Long.valueOf(bundle.getLong("expired_at", 0)));
            Serializable serializable = bundle.getSerializable("group");
            if (!(serializable instanceof B8Q)) {
                serializable = null;
            }
            groupInviteCardContent.setGroup((B8Q) serializable);
            return groupInviteCardContent;
        }
    }

    public final Long getExpiredAt() {
        return this.expiredAt;
    }

    public final B8Q getGroup() {
        return this.group;
    }

    public final String getInviteId() {
        return this.inviteId;
    }

    public final SharePackage generateSharePackage() {
        SharePackage LIZ = PureDataSharePackage.LIZ.LIZ("group");
        Bundle bundle = LIZ.LJIILJJIL;
        bundle.putString("invite_id", this.inviteId);
        Long l = this.expiredAt;
        if (l != null) {
            bundle.putLong("expired_at", l.longValue());
        }
        bundle.putSerializable("group", String.valueOf(this.group));
        return LIZ;
    }

    public final void setExpiredAt(Long l) {
        this.expiredAt = l;
    }

    public final void setGroup(B8Q b8q) {
        this.group = b8q;
    }

    public final void setInviteId(String str) {
        this.inviteId = str;
    }

    public final String getQuoteHint(Context context) {
        M12.LIZ(context);
        String string = context.getResources().getString(2131825934);
        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 = 9EH.LJJIFFI.LIZ().getString(2131822396);
            n.LIZIZ(string, "");
            return string;
        }
        String string2 = LIZ.getString(2131832092);
        n.LIZIZ(string2, "");
        return string2;
    }
}
