"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 __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
var core_1 = require("@angular/core");
var typescript_angular_utilities_1 = require("typescript-angular-utilities");
var __object = typescript_angular_utilities_1.services.object;
var __guid = typescript_angular_utilities_1.services.guid;
var componentsDefaultTheme_1 = require("../../componentsDefaultTheme");
var input_1 = require("../input");
var form_1 = require("../../form/form");
var CheckboxComponent = (function (_super) {
    __extends(CheckboxComponent, _super);
    function CheckboxComponent(defaultTheme, rlForm, object, guid) {
        var _this = _super.call(this, rlForm, object, guid) || this;
        _this.active = true;
        _this.inputType = 'checkbox';
        _this.initControl();
        _this.useDefaultTheme = defaultTheme.useDefaultTheme;
        return _this;
    }
    CheckboxComponent.prototype.toggle = function () {
        if (this.active) {
            this.setValue(!this.value);
        }
    };
    return CheckboxComponent;
}(input_1.InputComponent));
__decorate([
    core_1.Input(),
    __metadata("design:type", Boolean)
], CheckboxComponent.prototype, "active", void 0);
CheckboxComponent = __decorate([
    core_1.Component({
        selector: 'rlCheckbox',
        template: require('./checkbox.html'),
        inputs: input_1.baseInputs,
        outputs: input_1.baseOutputs,
    }),
    __param(1, core_1.Optional()),
    __metadata("design:paramtypes", [componentsDefaultTheme_1.DefaultTheme,
        form_1.FormComponent, __object.ObjectUtility, __guid.GuidService])
], CheckboxComponent);
exports.CheckboxComponent = CheckboxComponent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjaGVja2JveC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzQ0FBMkQ7QUFFM0QsNkVBQXdEO0FBQ3hELElBQU8sUUFBUSxHQUFHLHVDQUFRLENBQUMsTUFBTSxDQUFDO0FBRWxDLElBQU8sTUFBTSxHQUFHLHVDQUFRLENBQUMsSUFBSSxDQUFDO0FBRTlCLHVFQUE0RDtBQUU1RCxrQ0FBbUU7QUFDbkUsd0NBQWdEO0FBUWhELElBQWEsaUJBQWlCO0lBQVMscUNBQXVCO0lBSzdELDJCQUFZLFlBQTBCLEVBQ3RCLE1BQXFCLEVBQ2pDLE1BQThCLEVBQzlCLElBQXdCO1FBSDVCLFlBSUMsa0JBQU0sTUFBTSxFQUFFLE1BQU0sRUFBRSxJQUFJLENBQUMsU0FJM0I7UUFaUSxZQUFNLEdBQVksSUFBSSxDQUFDO1FBUy9CLEtBQUksQ0FBQyxTQUFTLEdBQUcsVUFBVSxDQUFDO1FBQzVCLEtBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNuQixLQUFJLENBQUMsZUFBZSxHQUFHLFlBQVksQ0FBQyxlQUFlLENBQUM7O0lBQ3JELENBQUM7SUFFRCxrQ0FBTSxHQUFOO1FBQ0MsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDakIsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQ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