"use strict";
var lodash_1 = require("lodash");
exports.baseInputs = ['type', 'disabled', 'size'];
var buttonClassPrefix = 'btn-';
var defaultButtonType = 'default';
var BaseButtonComponent = (function () {
    function BaseButtonComponent() {
    }
    Object.defineProperty(BaseButtonComponent.prototype, "configuredSize", {
        get: function () {
            return this.size != null && this.size !== ''
                ? buttonClassPrefix + this.size
                : null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseButtonComponent.prototype, "configuredTypes", {
        get: function () {
            var type = this.type || defaultButtonType;
            var typesList = type.split(' ');
            lodash_1.each(typesList, function (type, index) {
                //the for each for places that used btn-block for example in the type attribute do not break
                if (type.indexOf(buttonClassPrefix) === -1) {
                    type = buttonClassPrefix + type;
                }
                typesList[index] = type;
            });
            return typesList.join(' ');
        },
        enumerable: true,
        configurable: true
    });
    return BaseButtonComponent;
}());
exports.BaseButtonComponent = BaseButtonComponent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZUJ1dHRvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImJhc2VCdXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLGlDQUE4QjtBQUVqQixRQUFBLFVBQVUsR0FBYSxDQUFDLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFFakUsSUFBTSxpQkFBaUIsR0FBVyxNQUFNLENBQUM7QUFDekMsSUFBTSxpQkFBaUIsR0FBVyxTQUFTLENBQUM7QUFFNUM7SUFBQTtJQXVCQSxDQUFDO0lBbEJBLHNCQUFJLCtDQUFjO2FBQWxCO1lBQ0MsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLElBQUksSUFBSSxJQUFJLElBQUksQ0FBQyxJQUFJLEtBQUssRUFBRTtrQkFDekMsaUJBQWlCLEdBQUcsSUFBSSxDQUFDLElBQUk7a0JBQzdCLElBQUksQ0FBQztRQUNULENBQUM7O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