"use strict";
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 FilterGroupComponent = (function () {
    function FilterGroupComponent() {
        this.expanded = true;
    }
    Object.defineProperty(FilterGroupComponent.prototype, "headerTitle", {
        get: function () {
            if (!this.disabled) {
                return this.filterGroup.label + ': ' + this.filterGroup.activeOption.label;
            }
            return this.filterGroup.label;
        },
        enumerable: true,
        configurable: true
    });
    FilterGroupComponent.prototype.toggleExpanded = function () {
        this.expanded = !this.expanded;
    };
    Object.defineProperty(FilterGroupComponent.prototype, "childrenVisible", {
        get: function () {
            return this.expanded && !this.disabled;
        },
        enumerable: true,
        configurable: true
    });
    FilterGroupComponent.prototype.selectOption = function (option) {
        this.filterGroup.activeOption = option;
        this.expanded = false;
    };
    return FilterGroupComponent;
}());
__decorate([
    core_1.Input(),
    __metadata("design:type", Object)
], FilterGroupComponent.prototype, "filterGroup", void 0);
__decorate([
    core_1.Input(),
    __metadata("design:type", String)
], FilterGroupComponent.prototype, "icon", void 0);
__decorate([
    core_1.Input(),
    __metadata("design:type", Boolean)
], FilterGroupComponent.prototype, "disabled", void 0);
FilterGroupComponent = __decorate([
    core_1.Component({
        selector: 'rlFilterGroup',
        template: require('./filterGroup.component.html'),
        changeDetection: core_1.ChangeDetectionStrategy.OnPush,
    })
], FilterGroupComponent);
exports.FilterGroupComponent = FilterGroupComponent;
//# sourceMappingURL=data:application/json;base64,eyJ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