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 "primeng/checkbox";
import * as i5 from "@angular/flex-layout/flex";
import * as i6 from "@angular/forms";
import * as i7 from "../validation-messages/validation-messages.component";
export class CheckBoxComponent {
    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: CheckBoxComponent, 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: CheckBoxComponent, selector: "smz-checkbox", 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.showLabel || input.hideLabel != true\" class=\"col-12 smz__input_name\" [innerHTML]=\"input.label\"></label>\r\n    <div class=\"col-12 flex-gap-1\" fxLayoutGap=\"10px\">\r\n        <p-checkbox\r\n            class=\"smz__input_value\"\r\n            [name]=\"input.propertyName\"\r\n            [id]=\"input.propertyName\"\r\n            [label]=\"input.name\"\r\n            [formControl]=\"control\"\r\n            (onChange)=\"emitChange(input, formId, $event)\"\r\n            [binary]=\"true\">\r\n        </p-checkbox>\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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i5.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.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: CheckBoxComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-checkbox', host: { class: 'grid grid-nogutter' }, template: "<div class=\"grid col-12 grid-nogutter input_inner__wrapper flex-gap-1\">\r\n    <label *ngIf=\"input.showLabel || input.hideLabel != true\" class=\"col-12 smz__input_name\" [innerHTML]=\"input.label\"></label>\r\n    <div class=\"col-12 flex-gap-1\" fxLayoutGap=\"10px\">\r\n        <p-checkbox\r\n            class=\"smz__input_value\"\r\n            [name]=\"input.propertyName\"\r\n            [id]=\"input.propertyName\"\r\n            [label]=\"input.name\"\r\n            [formControl]=\"control\"\r\n            (onChange)=\"emitChange(input, formId, $event)\"\r\n            [binary]=\"true\">\r\n        </p-checkbox>\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, 