import { Component, Input, Output, EventEmitter } from "@angular/core";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
/**
 * Component to generate a number selector
 *
 * @author Floyd Kissoon
 * @since 20180628
 */
export class NumberSelector {
    constructor() {
        this.items = new Array();
        this.selectedValueChange = new EventEmitter();
    }
    /**
     * Called when an item has been selected
     */
    numChanged() {
        this.selectedValueChange.emit(this.selectedValue);
    }
    ngOnInit() {
        for (var i = this.start_value; i < this.end_value + 1; i++) {
            this.items.push(i);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NumberSelector, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NumberSelector, selector: "number-selector", inputs: { start_value: "start_value", end_value: "end_value", selectedValue: "selectedValue" }, outputs: { selectedValueChange: "selectedValueChange" }, ngImport: i0, template: "<div class=\"number-selector-wrapper\">\n    <select name=\"selectedValue\" [(ngModel)]=\"selectedValue\" class=\"form-control\" (change)=\"numChanged()\">\n        <option value=\"\">-- Student Status --</option>\n        <option *ngFor=\"let start_value of items;\" value=\"{{start_value}}\">{{start_value}}</option>\n    </select>\n</div>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NumberSelector, decorators: [{
            type: Component,
            args: [{ selector: "number-selector", template: "<div class=\"number-selector-wrapper\">\n    <select name=\"selectedValue\" [(ngModel)]=\"selectedValue\" class=\"form-control\" (change)=\"numChanged()\">\n        <option value=\"\">-- Student Status --</option>\n        <option *ngFor=\"let start_value of items;\" value=\"{{start_value}}\">{{start_value}}</option>\n    </select>\n</div>" }]
        }], ctorParameters: () => [], propDecorators: { start_value: [{
                type: Input
            }], end_value: [{
                type: Input
            }], selectedValueChange: [{
                type: Output
            }], selectedValue: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLXNlbGVjdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvdXRpbGl0eS9udW1iZXItc2VsZWN0b3IuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi91dGlsaXR5L251bWJlci1zZWxlY3Rvci5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQVUsTUFBTSxlQUFlLENBQUM7Ozs7QUFFL0U7Ozs7O0dBS0c7QUFLSCxNQUFNLE9BQU8sY0FBYztJQVF2QjtRQUZBLFVBQUssR0FBRyxJQUFJLEtBQUssRUFBRSxDQUFDO1FBR2hCLElBQUksQ0FBQyxtQkFBbUIsR0FBRyxJQUFJLFlBQVksRUFBVSxDQUFDO0lBQzFELENBQUM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