"use strict";
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var LotteryData = (function () {
    function LotteryData() {
    }
    LotteryData.prototype.update = function (data) {
        if (!data) {
            return;
        }
        this.androidDownloadUrl = data.androidDownloadUrl;
        this.iosDownloadUrl = data.iosDownloadUrl;
        this.img = data.imgurl;
        this.link = data.link;
        this.name = data.name ? data.name : data.title;
        this.openUrl = data.openUrl;
        this.showUse = data.showUse;
        this.tip = data.tip;
        this.title = data.title;
        this.useBtnText = data.useBtnText;
        this.validate = data.validate;
        this.type = data.type;
        this.confirm = data.confirm;
        this.id = data.id;
        if (data.stinfodpmclose) {
            this.closeExposure = JSON.parse(data.stinfodpmclose);
        }
        else {
            this.closeExposure = null;
        }
        if (data.stinfodpmgouse) {
            this.useExposure = JSON.parse(data.stinfodpmgouse);
        }
        else {
            this.useExposure = null;
        }
        if (data.stinfodpmimg) {
            this.imgExposure = JSON.parse(data.stinfodpmimg);
        }
        else {
            this.imgExposure = null;
        }
        if (data.itemId) {
            this.itemId = data.itemId;
        }
    };
    return LotteryData;
}());
exports.LotteryData = LotteryData;
__reflect(LotteryData.prototype, "\"/Users/haiyoucuv/Documents/Web/\u5DE5\u884C\u5361\u4E2D\u5FC3--\u6B22\u8DA3\u5E84\u56ED\u6D3B\u52A8/JoyousManor/egret/libs/tw/data/common/lottery/LotteryData\".LotteryData", ["\"/Users/haiyoucuv/Documents/Web/\u5DE5\u884C\u5361\u4E2D\u5FC3--\u6B22\u8DA3\u5E84\u56ED\u6D3B\u52A8/JoyousManor/egret/libs/tc/interface/IData\".IData"]);
//# sourceMappingURL=LotteryData.js.map