export class PopupUIDataConfig {
    private _uiName: string = null;
    private _typeImg: string = null;
    private _typeMoney: string = null;
    private _label_1: string = null;
    private _label_2: string = null;
    private _label_3: string = null;
    private _consume: string = null;
    private _funcYes: any = null;

    //可用军队卡槽数量
    private _availableCardSlot: number = 3;

    private static _instance: PopupUIDataConfig = null;
    private constructor() { };
    static get Instance(): PopupUIDataConfig {
        if (!this._instance) {
            this._instance = new PopupUIDataConfig();
        } return this._instance;
    }

    clearDt() {
        this._uiName = null;
        this._typeImg = null;
        this._typeMoney = null;
        this._label_1 = null;
        this._label_2 = null;
        this._label_3 = null;
        this._consume = null;
        this._funcYes = null;
    }
    getUIName(): string { return this._uiName };
    getTypeImg(): string { return this._typeImg };
    getTypeMoney(): string { return this._typeMoney };
    getLabel() {
        const label = [this._label_1, this._label_2, this._label_3, this._consume]
        return label;
    }
    getFunction(): Function {
        return this._funcYes;
    }

    getAvailableCardSlot(): number{
        return this._availableCardSlot;
    }

    setUIName(name: string) { this._uiName = name };
    setTypeImg(name: string) { this._typeImg = name };
    setTypeMoney(name: string) { this._typeMoney = name };
    setLabel(label_1: string, label_2: string, label_3: string, consume: string) {
        this._label_1 = label_1;
        this._label_2 = label_2;
        this._label_3 = label_3;
        this._consume = consume;
    }
    setFunction(func: any) {
        this._funcYes = func;
    }

    setAvailableCardSlot(nextCount: number){
        this._availableCardSlot = nextCount;
    }
}


