import { Component, Input, Output } from '@angular/core';
import { EventEmitter } from 'events';
import * as i0 from "@angular/core";
import * as i1 from "@ng-select/ng-select";
import * as i2 from "@angular/forms";
var PickerComponent = /** @class */ (function () {
    function PickerComponent() {
        this.onChange = new EventEmitter();
    }
    PickerComponent.prototype.ngOnInit = function () {
    };
    PickerComponent.prototype.handleSelectValue = function (value) {
        this.onChange.emit(value);
    };
    PickerComponent.ɵfac = function PickerComponent_Factory(t) { return new (t || PickerComponent)(); };
    PickerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: PickerComponent, selectors: [["ins-picker"]], inputs: { name: "name", placeholderText: "placeholderText", items: "items" }, outputs: { onChange: "onChange" }, decls: 1, vars: 5, consts: [[3, "items", "name", "placeholder", "multiple", "ngModel", "ngModelChange"]], template: function PickerComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "ng-select", 0);
            i0.ɵɵlistener("ngModelChange", function PickerComponent_Template_ng_select_ngModelChange_0_listener($event) { return ctx.value = $event; })("ngModelChange", function PickerComponent_Template_ng_select_ngModelChange_0_listener($event) { return ctx.handleSelectValue($event); });
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵproperty("items", ctx.items)("name", ctx.name)("placeholder", ctx.value ? "" : ctx.placeholderText)("multiple", false)("ngModel", ctx.value);
        } }, directives: [i1.NgSelectComponent, i2.NgControlStatus, i2.NgModel], styles: ["@import url(https://fonts.googleapis.com/css2?family=Palanquin:wght@300;400&display=swap)[_ngcontent-%COMP%];ng-select[_ngcontent-%COMP%]     .ng-select-container{border:none;background:0 0;font-family:Palanquin,sans-serif}.ng-select[_ngcontent-%COMP%]     .ng-value-container{padding-left:0}.ng-select[_ngcontent-%COMP%]     .ng-value-container .ng-placeholder{color:gray;opacity:1}.ng-select[_ngcontent-%COMP%]     .ng-value-container .ng-input input{font-size:16px}.ng-select[_ngcontent-%COMP%]     .ng-input{padding-left:28px}ng-select[_ngcontent-%COMP%]     .ng-select-container .ng-value-container::before{content:'';background-image:url(../../assets/icons/add-sign.png);background-size:contain;background-repeat:no-repeat;width:20px;height:20px;margin-right:10px}.ng-select[_ngcontent-%COMP%]     .ng-select-container .ng-value-container .ng-input{padding-left:24px}ng-select[_ngcontent-%COMP%]     ng-dropdown-panel{font-family:Roboto,sans-serif;box-shadow:1px 1px 5px gray;background:#fff;padding:5px}ng-select[_ngcontent-%COMP%]     .ng-arrow-wrapper .ng-arrow{display:none}"] });
    return PickerComponent;
}());
export { PickerComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(PickerComponent, [{
        type: Component,
        args: [{
                selector: 'ins-picker',
                templateUrl: './picker.component.html',
                styleUrls: ['./picker.component.scss']
            }]
    }], function () { return []; }, { name: [{
            type: Input
        }], placeholderText: [{
            type: Input
        }], items: [{
            type: Input
        }], onChange: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlja2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2luc3BpcmUtbGlicmFyeS8iLCJzb3VyY2VzIjpbImxpYi9waWNrZXIvcGlja2VyLmNvbXBvbmVudC50cyIsImxpYi9waWNrZXIvcGlja2VyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sUUFBUSxDQUFDOzs7O0FBRXRDO0lBWUU7UUFIVSxhQUFRLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ0FBQztJQUd4QixDQUFDO0lBRWpCLGtDQUFRLEdBQVI7SUFDQSxDQUFDO0lBRUQsMkNBQWlCLEdBQWpCLFVBQWtCLEtBQUs7UUFDckIsSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsS0FBSy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