import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../services/smz-forms-visibility.service";
import * as i2 from "../../../smz-dialogs/services/smz-dialogs-visibility.service";
import * as i3 from "@angular/common";
import * as i4 from "@angular/flex-layout/flex";
import * as i5 from "@angular/forms";
import * as i6 from "primeng/radiobutton";
import * as i7 from "../validation-messages/validation-messages.component";
export class RadioButtonComponent {
    constructor(formsService, dialogVisibility) {
        this.formsService = formsService;
        this.dialogVisibility = dialogVisibility;
    }
    ngOnInit() {
        this.formsService.registryDependsOnData(this.input, this.formId);
    }
    emitChange(input, formId, event) {
        this.formsService.setValue(input, formId, event);
        this.dialogVisibility.setValue(input, formId, event);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioButtonComponent, deps: [{ token: i1.SmzFormsVisibilityService }, { token: i2.SmzDialogsVisibilityService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: RadioButtonComponent, selector: "smz-radio-button", inputs: { input: "input", formId: "formId", control: "control", behaviors: "behaviors" }, host: { classAttribute: "grid grid-nogutter" }, ngImport: i0, template: "<div class=\"grid col-12 grid-nogutter input_inner__wrapper flex-gap-1\">\r\n    <label *ngIf=\"input.hideLabel != true\" class=\"smz__input_name\" class=\"col-12\" [for]=\"input.propertyName\" [innerHTML]=\"input.name\"></label>\r\n    <div class=\"col-12 radio_container\" fxLayoutGap=\"10px\">\r\n        <ng-container *ngFor=\"let option of input.options\">\r\n            <p-radioButton\r\n                class=\"smz__input_value\"\r\n                [name]=\"input.propertyName\"\r\n                [id]=\"input.propertyName\"\r\n                [value]=\"option.id\"\r\n                [label]=\"option.name\"\r\n                [formControl]=\"control\"\r\n                (onClick)=\"emitChange(input, formId, $event)\">\r\n            </p-radioButton>\r\n        </ng-container>\r\n    </div>\r\n    <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\r\n</div>", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.DefaultLayoutGapDirective, selector: "  [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md],  [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md],  [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm],  [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.ValidationMessagesComponent, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors", "extraMessages"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-radio-button', host: { class: 'grid grid-nogutter' }, template: "<div class=\"grid col-12 grid-nogutter input_inner__wrapper flex-gap-1\">\r\n    <label *ngIf=\"input.hideLabel != true\" class=\"smz__input_name\" class=\"col-12\" [for]=\"input.propertyName\" [innerHTML]=\"input.name\"></label>\r\n    <div class=\"col-12 radio_container\" fxLayoutGap=\"10px\">\r\n        <ng-container *ngFor=\"let option of input.options\">\r\n            <p-radioButton\r\n                class=\"smz__input_value\"\r\n                [name]=\"input.propertyName\"\r\n                [id]=\"input.propertyName\"\r\n                [value]=\"option.id\"\r\n                [label]=\"option.name\"\r\n                [formControl]=\"control\"\r\n                (onClick)=\"emitChange(input, formId, $event)\">\r\n            </p-radioButton>\r\n        </ng-container>\r\n    </div>\r\n    <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\r\n</div>" }]
        }], ctorParameters: () => [{ type: i1.SmzFormsVisibilityService }, { type: i2.SmzDialogsVisibilityService }], propDecorators: { input: [{
                type: Input
            }], formId: [{
                type: Input
            }], control: [{
                type: Input
            }], behaviors: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 