/**
 * @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 RadioControllComponent = /** @class */ (function () {
    function RadioControllComponent(_privateDynamicFromService, _dynamicFormService) {
        this._privateDynamicFromService = _privateDynamicFromService;
        this._dynamicFormService = _dynamicFormService;
        this.privateConstants = PrivateConstants;
    }
    /**
     * @return {?}
     */
    RadioControllComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    /**
     * @param {?} errorListObj
     * @param {?} fieldObj
     * @return {?}
     */
    RadioControllComponent.prototype.errorList = /**
     * @param {?} errorListObj
     * @param {?} fieldObj
     * @return {?}
     */
    function (errorListObj, fieldObj) {
        return this._privateDynamicFromService.errorList(errorListObj, fieldObj);
    };
    /**
     * @param {?} validations
     * @return {?}
     */
    RadioControllComponent.prototype.showRequired = /**
     * @param {?} validations
     * @return {?}
     */
    function (validations) {
        return this._privateDynamicFromService.showRequired(validations);
    };
    /**
     * @param {?} event
     * @return {?}
     */
    RadioControllComponent.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);
                }));
            }
        }));
    };
    /**
     * @param {?} field
     * @return {?}
     */
    RadioControllComponent.prototype.handleReadonlyAttr = /**
     * @param {?} field
     * @return {?}
     */
    function (field) {
        return this._privateDynamicFromService.handleReadonlyAttr(field);
    };
    /**
     * @param {?} attrObj
     * @return {?}
     */
    RadioControllComponent.prototype.handleReadonly = /**
     * @param {?} attrObj
     * @return {?}
     */
    function (attrObj) {
        this._privateDynamicFromService.handleReadonly(attrObj);
    };
    RadioControllComponent.decorators = [
        { type: Component, args: [{
                    selector: 'radio-controll',
                    template: "<div class=\"form-group {{(field.class) ? field.class : ''}}\" [formGroup]=\"parentFormGroup\">\n    <show-label [class]=\"'form-check-label col-12 pl-0 pt-2 pb-2'\" [labelName]=\"field.label\"\n        [isrequired]=\"showRequired(field.validations)\"></show-label>\n\n    <div class=\"form-button-style pt-1 \"\n        [ngClass]=\"{'readonly-text-color': handleReadonlyAttr(field), 'border border-danger': (errorList(parentFormGroup.controls[field.name], field).length > 0)}\">\n        <label class=\"toggle\" *ngFor=\"let option of field.otherOptions;\">\n            <input type=\"radio\" name=\"{{field.name}}\" [formControlName]=\"field.name\" (change)=\"changeEvent($event)\"\n                (click)=\"handleReadonly(field)\" value=\"{{option.value}}\">\n\n            <span class=\"label-text radio-label\">{{option.label}}</span>\n        </label>\n    </div>\n\n    <show-error [errorList]=\"errorList(parentFormGroup.controls[field.name], field)\"></show-error>\n</div>",
                    styles: [".form-button-style .radio-label{font-size:1rem}.form-button-style input[type=radio]{position:absolute;right:9000px}.form-button-style input[type=radio]+.label-text:before{content:\"\\f10c\";font-family:FontAwesome;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;width:1em;display:inline-block;margin-right:5px}.form-button-style input[type=radio]:checked+.label-text:before{content:\"\\f192\";color:#8e44ad;-webkit-animation:250ms ease-in effect;animation:250ms ease-in effect}.form-button-style input[type=radio]:disabled+.label-text{color:#aaa}.form-button-style input[type=radio]:disabled+.label-text:before{content:\"\\f111\";color:#ccc}.form-button-style .toggle input[type=radio]+.label-text:before{content:\"\\f204\";font-family:FontAwesome;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;width:1em;display:inline-block;margin-right:10px}.form-button-style .toggle input[type=radio]:checked+.label-text:before{content:\"\\f205\";color:#16a085;-webkit-animation:250ms ease-in effect;animation:250ms ease-in effect}.form-button-style .toggle input[type=radio]:disabled+.label-text{color:#aaa}.form-button-style .toggle input[type=radio]:disabled+.label-text:before{content:\"\\f204\";color:#ccc}@-webkit-keyframes effect{0%{-webkit-transform:scale(0);transform:scale(0)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}75%{-webkit-transform:scale(1.4);transform:scale(1.4)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes effect{0%{-webkit-transform:scale(0);transform:scale(0)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}75%{-webkit-transform:scale(1.4);transform:scale(1.4)}100%{-webkit-transform:scale(1);transform:scale(1)}}.form-button-style label{margin-right:.5rem}"]
                }] }
    ];
    /** @nocollapse */
    RadioControllComponent.ctorParameters = function () { return [
        { type: PrivateDynamicFromService },
        { type: DynamicFormService }
    ]; };
    RadioControllComponent.propDecorators = {
        rowField: [{ type: Input }],
        field: [{ type: Input }],
        parentFormGroup: [{ type: Input }],
        i: [{ type: Input }],
        j: [{ type: Input }]
    };
    return RadioControllComponent;
}());
export { RadioControllComponent };
if (false) {
    /** @type {?} */
    RadioControllComponent.prototype.rowField;
    /** @type {?} */
    RadioControllComponent.prototype.field;
    /** @type {?} */
    RadioControllComponent.prototype.parentFormGroup;
    /** @type {?} */
    RadioControllComponent.prototype.i;
    /** @type {?} */
    RadioControllComponent.prototype.j;
    /** @type {?} */
    RadioControllComponent.prototype.privateConstants;
    /**
     * @type {?}
     * @private
     */
    RadioControllComponent.prototype._privateDynamicFromService;
    /**
     * @type {?}
     * @private
     */
    RadioControllComponent.prototype._dynamicFormService;
}
//# sourceMappingURL=data:application/json;base64, 