import { __decorate, __read, __spread } from "tslib";
import { Component, Input } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
var CountdownComponent = /** @class */ (function () {
    /**
     * Initialise Services
     * @param formBuilder
     */
    function CountdownComponent(formBuilder) {
        this.formBuilder = formBuilder;
        /**
         * @description
         * Hours Range
         */
        this.daysRange = __spread(Array(32).keys());
        /**
         * @description
         * Hours Range
         */
        this.hoursRange = __spread(Array(13).keys());
        /**
         * @description
         * Minutes Range
         */
        this.mintsRange = __spread(Array(60).keys());
        /**
         * @description
         * Seconds Range
         */
        this.secondsRange = __spread(Array(60).keys());
    }
    /**
     * NgOnint hook
     */
    CountdownComponent.prototype.ngOnInit = function () {
        this.initializeProcess();
    };
    /**
     * Initialise Form
     */
    CountdownComponent.prototype.initializeProcess = function () {
        this.createCountdownControl();
    };
    /**
     * Create From control for managing Countdown
     */
    CountdownComponent.prototype.createCountdownControl = function () {
        this.parentFrom.addControl('countdown', this.formBuilder.group({
            status: [false],
            time: [''],
            days: ['Day(s)'],
            hours: ['Hour(s)'],
            mnts: ['Minute(s)'],
            secs: ['Second(s)'],
        }));
        //Use group validations
    };
    /**
     * @description
     * DropDown compare values for default section
     */
    CountdownComponent.prototype.compareFn = function (o1, o2) {
        return o1 == o2;
    };
    CountdownComponent.ctorParameters = function () { return [
        { type: FormBuilder }
    ]; };
    __decorate([
        Input()
    ], CountdownComponent.prototype, "parentFrom", void 0);
    CountdownComponent = __decorate([
        Component({
            selector: 'ew-control-countdown',
            template: "<div class=\"elements-custom-outer-ew\" [formGroup]=\"parentFrom.get('countdown')\">\r\n\t<div class=\"left-list-item\">\r\n\t\t<span class=\"title-list-nav\">Countdown</span>\r\n\t</div>\r\n\t<div class=\"right-list-item\">\r\n\t\t<div class=\"ew-toggle-button\">\r\n\t\t\t<div class=\"toggle-button-cover\">\r\n\t\t\t\t<div class=\"button-cover\">\r\n\t\t\t\t\t<div class=\"button b3\" id=\"button-ew\">\r\n\t\t\t\t\t\t<input type=\"checkbox\" class=\"checkbox\" formControlName=\"status\">\r\n\t\t\t\t\t\t<div class=\"knobs\">\r\n\t\t\t\t\t\t\t<span></span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"layer\"></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"bottom-custom-design-fields\">\r\n\t\t<div class=\"design-view-countdow-fields\">\r\n\t\t\t<span class=\"timr-label-fields\">\r\n\t\t\t\tTIMER LABELS\r\n\t\t\t</span>\r\n\t\t\t<div class=\"row\" *ngIf=\"!parentFrom.value.countdown.status\">\r\n\t\t\t\t<div class=\"col m3 s3\">\r\n\t\t\t\t\t<!-- <mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t<mat-select matInput placeholder=\"Days\" formControlName=\"days\">\r\n\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t*ngFor=\"let n of daysRange\"\r\n\t\t\t\t\t\t\t\t[value]=\"(n < 10 ? '0'+n : ''+n)\"\r\n\t\t\t\t\t\t \t>{{ n }}</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</mat-form-field> -->\r\n\t\t\t\t\t<div class=\"bottom-custom-design-fields\">\r\n\t\t\t\t\t\t<mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t\t<input formControlName=\"days\" matInput placeholder=\"Day(s)\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col m3 s3\">\r\n\t\t\t\t\t<!-- <mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t<mat-select matInput placeholder=\"Hours\" formControlName=\"hours\">\r\n\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t*ngFor=\"let n of hoursRange\"\r\n\t\t\t\t\t\t\t\t[value]=\"(n < 10 ? '0'+n : ''+n)\"\r\n\t\t\t\t\t\t \t>{{ n }}</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</mat-form-field> -->\r\n\t\t\t\t\t<div class=\"bottom-custom-design-fields\">\r\n\t\t\t\t\t\t<mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t\t<input formControlName=\"hours\" matInput placeholder=\"Hour(s)\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col m3 s3\">\r\n\t\t\t\t\t<!-- <mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t<mat-select matInput placeholder=\"Minutes\" formControlName=\"mnts\">\r\n\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t*ngFor=\"let n of mintsRange\"\r\n\t\t\t\t\t\t\t\t[value]=\"(n < 10 ? '0'+n : ''+n)\"\r\n\t\t\t\t\t\t \t>{{ n }}</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</mat-form-field> -->\r\n\t\t\t\t\t<div class=\"bottom-custom-design-fields\">\r\n\t\t\t\t\t\t<mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t\t<input formControlName=\"mnts\" matInput placeholder=\"Minute(s)\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col m3 s3\">\r\n\t\t\t\t\t<!-- <mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t<mat-select matInput [compareWith]=\"compareFn\" formControlName=\"secs\" placeholder=\"Seconds\">\r\n\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t*ngFor=\"let n of secondsRange\"\r\n\t\t\t\t\t\t\t\t[value]=\"(n < 10 ? '0'+n : ''+n)\"\r\n\t\t\t\t\t\t \t>{{ n }}</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</mat-form-field> -->\r\n\t\t\t\t\t<div class=\"bottom-custom-design-fields\">\r\n\t\t\t\t\t\t<mat-form-field class=\"ew-field-no-label\" floatLabel=\"never\">\r\n\t\t\t\t\t\t\t<input formControlName=\"secs\" matInput placeholder=\"Second(s)\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t</div>\r\n</div>\r\n",
            styles: [""]
        })
    ], CountdownComponent);
    return CountdownComponent;
}());
export { CountdownComponent };
//# sourceMappingURL=data:application/json;base64, 