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);
};
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { READ_ACCESS } from '../../domain/case-view/access-types.model';
import { DefinitionsService } from '../../services';
var CaseListFiltersComponent = /** @class */ (function () {
    function CaseListFiltersComponent(definitionsService) {
        this.definitionsService = definitionsService;
        this.onApply = new EventEmitter();
        this.onReset = new EventEmitter();
    }
    CaseListFiltersComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.isVisible = false;
        this.definitionsService.getJurisdictions(READ_ACCESS)
            .subscribe(function (jurisdictions) {
            _this.isVisible = jurisdictions.length > 0;
            _this.jurisdictions = jurisdictions;
        });
    };
    CaseListFiltersComponent.prototype.onWrapperApply = function (value) {
        this.onApply.emit(value);
    };
    CaseListFiltersComponent.prototype.onWrapperReset = function (value) {
        this.onReset.emit(value);
    };
    __decorate([
        Input(),
        __metadata("design:type", Object)
    ], CaseListFiltersComponent.prototype, "defaults", void 0);
    __decorate([
        Output(),
        __metadata("design:type", EventEmitter)
    ], CaseListFiltersComponent.prototype, "onApply", void 0);
    __decorate([
        Output(),
        __metadata("design:type", EventEmitter)
    ], CaseListFiltersComponent.prototype, "onReset", void 0);
    CaseListFiltersComponent = __decorate([
        Component({
            selector: 'ccd-case-list-filters',
            template: "\n    <ccd-workbasket-filters\n      *ngIf=\"isVisible\"\n      [jurisdictions]=\"jurisdictions\"\n      [defaults]=\"defaults\"\n      (onApply)=\"onWrapperApply($event)\"\n      (onReset)=\"onWrapperReset($event)\"\n    ></ccd-workbasket-filters>\n  "
        }),
        __metadata("design:paramtypes", [DefinitionsService])
    ], CaseListFiltersComponent);
    return CaseListFiltersComponent;
}());
export { CaseListFiltersComponent };
//# sourceMappingURL=case-list-filters.component.js.map