"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var baseButton_1 = require("../baseButton");
var ButtonToggleComponent = (function (_super) {
    __extends(ButtonToggleComponent, _super);
    function ButtonToggleComponent() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.change = new core_1.EventEmitter();
        _this.valueChange = _this.change;
        return _this;
    }
    ButtonToggleComponent.prototype.toggle = function () {
        if (!this.disabled) {
            this.value = !this.value;
            this.change.emit(this.value);
        }
    };
    return ButtonToggleComponent;
}(baseButton_1.BaseButtonComponent));
__decorate([
    core_1.Input(),
    __metadata("design:type", Boolean)
], ButtonToggleComponent.prototype, "value", void 0);
__decorate([
    core_1.Output(),
    __metadata("design:type", core_1.EventEmitter)
], ButtonToggleComponent.prototype, "change", void 0);
__decorate([
    core_1.Output(),
    __metadata("design:type", core_1.EventEmitter)
], ButtonToggleComponent.prototype, "valueChange", void 0);
ButtonToggleComponent = __decorate([
    core_1.Component({
        selector: 'rlButtonToggle',
        template: require('./buttonToggle.html'),
        inputs: baseButton_1.baseInputs,
    })
], ButtonToggleComponent);
exports.ButtonToggleComponent = ButtonToggleComponent;
//# sourceMappingURL=data:application/json;base64,eyJ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