/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { PrivateConstants } from '../../constants';
import { PrivateDynamicFromService, DynamicFormService } from '../../services';
var PasswordControllComponent = /** @class */ (function () {
    function PasswordControllComponent(_privateDynamicFromService, _dynamicFormService) {
        this._privateDynamicFromService = _privateDynamicFromService;
        this._dynamicFormService = _dynamicFormService;
        this.privateConstants = PrivateConstants;
    }
    /**
     * @return {?}
     */
    PasswordControllComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    /**
     * @param {?} errorListObj
     * @param {?} fieldObj
     * @return {?}
     */
    PasswordControllComponent.prototype.errorList = /**
     * @param {?} errorListObj
     * @param {?} fieldObj
     * @return {?}
     */
    function (errorListObj, fieldObj) {
        return this._privateDynamicFromService.errorList(errorListObj, fieldObj);
    };
    /**
     * @param {?} validations
     * @return {?}
     */
    PasswordControllComponent.prototype.showRequired = /**
     * @param {?} validations
     * @return {?}
     */
    function (validations) {
        return this._privateDynamicFromService.showRequired(validations);
    };
    /**
     * @param {?} event
     * @return {?}
     */
    PasswordControllComponent.prototype.changeEvent = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        var _this = this;
        this._privateDynamicFromService.changeEvent(event).subscribe((/**
         * @param {?} resp
         * @return {?}
         */
        function (resp) {
            if (resp && resp.length) {
                resp.forEach((/**
                 * @param {?} updateForm
                 * @return {?}
                 */
                function (updateForm) {
                    _this._dynamicFormService.updateFormAttr(updateForm);
                }));
            }
        }));
    };
    PasswordControllComponent.decorators = [
        { type: Component, args: [{
                    selector: 'password-controll',
                    template: "<div class=\"form-group {{(field.class) ? field.class : ''}}\" [formGroup]=\"parentFormGroup\">\n    <show-label [class]=\"'col-form-label'\" [labelName]=\"field.label\" [labelId]=\"field.name + '-' + (i + '' + j)\"\n        [isrequired]=\"showRequired(field.validations)\">\n    </show-label>\n\n    <input type=\"password\" class=\"form-control input-underline input-lg ml-0\" [formControlName]=\"field.name\"\n        (change)=\"changeEvent($event)\" [readonly]=\"((field.attr && field.attr.readonly) ? true : false)\"\n        data-name=\"{{field.name}}\"\n        [placeholder]=\"((field.attr && field.attr.placeholder) ? field.attr.placeholder : '')\"\n        id=\"{{field.name + '-' + (i + '' + j)}}\"\n        [ngClass]=\"{ 'border border-danger': (errorList(parentFormGroup.controls[field.name], field).length > 0) }\">\n\n    <show-error [errorList]=\"errorList(parentFormGroup.controls[field.name], field)\"></show-error>\n</div>",
                    styles: [""]
                }] }
    ];
    /** @nocollapse */
    PasswordControllComponent.ctorParameters = function () { return [
        { type: PrivateDynamicFromService },
        { type: DynamicFormService }
    ]; };
    PasswordControllComponent.propDecorators = {
        rowField: [{ type: Input }],
        field: [{ type: Input }],
        parentFormGroup: [{ type: Input }],
        i: [{ type: Input }],
        j: [{ type: Input }]
    };
    return PasswordControllComponent;
}());
export { PasswordControllComponent };
if (false) {
    /** @type {?} */
    PasswordControllComponent.prototype.rowField;
    /** @type {?} */
    PasswordControllComponent.prototype.field;
    /** @type {?} */
    PasswordControllComponent.prototype.parentFormGroup;
    /** @type {?} */
    PasswordControllComponent.prototype.i;
    /** @type {?} */
    PasswordControllComponent.prototype.j;
    /** @type {?} */
    PasswordControllComponent.prototype.privateConstants;
    /**
     * @type {?}
     * @private
     */
    PasswordControllComponent.prototype._privateDynamicFromService;
    /**
     * @type {?}
     * @private
     */
    PasswordControllComponent.prototype._dynamicFormService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3dvcmQtY29udHJvbGwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci1yZWFjdGl2ZS1keW5hbWljLWZvcm1zLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudHMvcGFzc3dvcmQtY29udHJvbGwvcGFzc3dvcmQtY29udHJvbGwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwib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