"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 __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
var core_1 = require("@angular/core");
var typeaheadList_1 = require("./typeaheadList");
var TypeaheadDataItemComponent = (function () {
    function TypeaheadDataItemComponent(typeaheadList) {
        var _this = this;
        this.remove = function () {
            return _this.typeaheadList.remove(_this.item);
        };
        this.typeaheadList = typeaheadList;
    }
    Object.defineProperty(TypeaheadDataItemComponent.prototype, "context", {
        get: function () {
            return {
                $implicit: this.item,
                remove: this.remove.bind(this),
            };
        },
        enumerable: true,
        configurable: true
    });
    return TypeaheadDataItemComponent;
}());
__decorate([
    core_1.Input('rlTypeaheadDataItem'),
    __metadata("design:type", Object)
], TypeaheadDataItemComponent.prototype, "item", void 0);
TypeaheadDataItemComponent = __decorate([
    core_1.Component({
        selector: '[rlTypeaheadDataItem]',
        template: '<ng-content></ng-content>'
    }),
    __param(0, core_1.Inject(core_1.forwardRef(function () { return typeaheadList_1.TypeaheadListComponent; }))),
    __metadata("design:paramtypes", [typeaheadList_1.TypeaheadListComponent])
], TypeaheadDataItemComponent);
exports.TypeaheadDataItemComponent = TypeaheadDataItemComponent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZWFoZWFkRGF0YUl0ZW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc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