/**
 * @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';
export class PasswordControllComponent {
    /**
     * @param {?} _privateDynamicFromService
     * @param {?} _dynamicFormService
     */
    constructor(_privateDynamicFromService, _dynamicFormService) {
        this._privateDynamicFromService = _privateDynamicFromService;
        this._dynamicFormService = _dynamicFormService;
        this.privateConstants = PrivateConstants;
    }
    /**
     * @return {?}
     */
    ngOnInit() { }
    /**
     * @param {?} errorListObj
     * @param {?} fieldObj
     * @return {?}
     */
    errorList(errorListObj, fieldObj) {
        return this._privateDynamicFromService.errorList(errorListObj, fieldObj);
    }
    /**
     * @param {?} validations
     * @return {?}
     */
    showRequired(validations) {
        return this._privateDynamicFromService.showRequired(validations);
    }
    /**
     * @param {?} event
     * @return {?}
     */
    changeEvent(event) {
        this._privateDynamicFromService.changeEvent(event).subscribe((/**
         * @param {?} resp
         * @return {?}
         */
        resp => {
            if (resp && resp.length) {
                resp.forEach((/**
                 * @param {?} updateForm
                 * @return {?}
                 */
                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 = () => [
    { type: PrivateDynamicFromService },
    { type: DynamicFormService }
];
PasswordControllComponent.propDecorators = {
    rowField: [{ type: Input }],
    field: [{ type: Input }],
    parentFormGroup: [{ type: Input }],
    i: [{ type: Input }],
    j: [{ type: Input }]
};
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3dvcmQtY29udHJvbGwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci1yZWFjdGl2ZS1keW5hbWljLWZvcm1zLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudHMvcGFzc3dvcmQtY29udHJvbGwvcGFzc3dvcmQtY29udHJvbGwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6RCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNuRCxPQUFPLEVBQUUseUJBQXlCLEVBQUUsa0JBQWtCLEVBQUUsT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