"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var IActionsButtonType;
(function (IActionsButtonType) {
    IActionsButtonType["SELECT"] = "select";
    IActionsButtonType["CHECKBOX"] = "checkbox";
    IActionsButtonType["ROTATE"] = "rotate";
    IActionsButtonType["CHAT"] = "chat";
    IActionsButtonType["BUTTON"] = "button";
    IActionsButtonType["DATE"] = "date";
})(IActionsButtonType = exports.IActionsButtonType || (exports.IActionsButtonType = {}));
var Button = /** @class */ (function () {
    function Button(data) {
        this.name = '';
        this.range = '';
        this.type = IActionsButtonType.BUTTON;
        this.options = [];
        this.users = [];
        this.checkboxTrueValue = '';
        this.checkboxFalseValue = '';
        this.checkboxToggle = '';
        this.dateValueFormat = 'YYYY-MM-DD';
        this.dateDisplayFormat = 'YYYY-MM-DD';
        this.componentPlugin = '';
        this.parse(data || {});
    }
    Button.prototype.parse = function (data) {
        var _this = this;
        [
            'type',
            'name',
            'range',
            'options',
            'users',
            'checkboxTrueValue',
            'checkboxFalseValue',
            'checkboxToggle',
            'dateValueFormat',
            'dateDisplayFormat',
            'componentPlugin'
        ].forEach(function (key) {
            if (!data[key])
                return;
            _this[key] = data[key];
        });
    };
    return Button;
}());
exports.Button = Button;
//# sourceMappingURL=Buttons.js.map