import { Component, Inject, Input, Optional, ViewChild } from '@angular/core';
import { NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgModel } from '@angular/forms';
import { ElementBase } from '../../base/element-base';
import { INPUT_FORMS_CONFIG } from '../../input-forms-config.constants';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
let identifier = 0;
export class InputRadioComponent extends ElementBase {
    constructor(validators, asyncValidators, config) {
        super(validators, asyncValidators, config);
        this.config = config;
        this.identifier = `input-radio-${identifier++}`;
    }
}
InputRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputRadioComponent, deps: [{ token: NG_VALIDATORS, optional: true }, { token: NG_ASYNC_VALIDATORS, optional: true }, { token: INPUT_FORMS_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
InputRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: InputRadioComponent, selector: "input-radio", inputs: { name: "name", radioValue: "radioValue" }, providers: [{
            provide: NG_VALUE_ACCESSOR,
            useExisting: InputRadioComponent,
            multi: true
        }], viewQueries: [{ propertyName: "model", first: true, predicate: NgModel, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"radio\">\n  <label>\n    <input type=\"radio\" \n      [name]=\"name\" \n      [value]=\"radioValue\"\n      [disabled]=\"disabled\" \n      [(ngModel)]=\"value\"\n      [id]=\"identifier\">\n    {{label}}\n  </label>\n</div>", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputRadioComponent, decorators: [{
            type: Component,
            args: [{ selector: 'input-radio', providers: [{
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: InputRadioComponent,
                            multi: true
                        }], template: "<div class=\"radio\">\n  <label>\n    <input type=\"radio\" \n      [name]=\"name\" \n      [value]=\"radioValue\"\n      [disabled]=\"disabled\" \n      [(ngModel)]=\"value\"\n      [id]=\"identifier\">\n    {{label}}\n  </label>\n</div>" }]
        }], ctorParameters: function () { return [{ type: Array, decorators: [{
                    type: Optional
                }, {
                    type: Inject,
                    args: [NG_VALIDATORS]
                }] }, { type: Array, decorators: [{
                    type: Optional
                }, {
                    type: Inject,
                    args: [NG_ASYNC_VALIDATORS]
                }] }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [INPUT_FORMS_CONFIG]
                }] }]; }, propDecorators: { name: [{
                type: Input
            }], radioValue: [{
                type: Input
            }], model: [{
                type: ViewChild,
                args: [NgModel, { static: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtcmFkaW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXVpLWhlcm8vc3JjL2xpYi9pbnB1dC1mb3Jtcy9jb21wb25lbnRzL2lucHV0LXJhZGlvL2lucHV0LXJhZGlvLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC11aS1oZXJvL3NyYy9saWIvaW5wdXQtZm9ybXMvY29tcG9uZW50cy9pbnB1dC1yYWRpby9pbnB1dC1yYWRp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