import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule } from '@angular/forms';
import { CheckboxModule } from 'primeng/checkbox';
import { TranslatePipe } from '../../../pipes/translate.pipe';
import { DynamicFieldBaseComponent } from './dynamic-field-base.component';
import * as i0 from "@angular/core";
import * as i1 from "../../../services/translation.service";
import * as i2 from "@angular/forms";
import * as i3 from "primeng/checkbox";
export class DynamicFieldCheckboxComponent extends DynamicFieldBaseComponent {
    constructor(translationService) {
        super(translationService);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFieldCheckboxComponent, deps: [{ token: i1.TranslationService }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: DynamicFieldCheckboxComponent, isStandalone: true, selector: "sia-dynamic-field-checkbox", usesInheritance: true, ngImport: i0, template: `
    <div class="field checkbox-field" [formGroup]="form">
      <div class="checkbox-container">
        <p-checkbox
          [inputId]="field.field"
          [formControlName]="field.field"
          [binary]="true">
        </p-checkbox>
        <label [for]="field.field" class="checkbox-label">
          {{ field.label | translate }}
        </label>
      </div>
    </div>
  `, isInline: true, styles: [".checkbox-field{display:flex;align-items:center;min-height:2.5rem;padding-top:1.625rem}.checkbox-container{display:flex;align-items:center;gap:.5rem}.checkbox-label{font-weight:500;color:var(--text-color);cursor:pointer;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i3.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFieldCheckboxComponent, decorators: [{
            type: Component,
            args: [{ selector: 'sia-dynamic-field-checkbox', standalone: true, imports: [
                        CommonModule,
                        ReactiveFormsModule,
                        CheckboxModule,
                        TranslatePipe
                    ], template: `
    <div class="field checkbox-field" [formGroup]="form">
      <div class="checkbox-container">
        <p-checkbox
          [inputId]="field.field"
          [formControlName]="field.field"
          [binary]="true">
        </p-checkbox>
        <label [for]="field.field" class="checkbox-label">
          {{ field.label | translate }}
        </label>
      </div>
    </div>
  `, styles: [".checkbox-field{display:flex;align-items:center;min-height:2.5rem;padding-top:1.625rem}.checkbox-container{display:flex;align-items:center;gap:.5rem}.checkbox-label{font-weight:500;color:var(--text-color);cursor:pointer;-webkit-user-select:none;user-select:none}\n"] }]
        }], ctorParameters: () => [{ type: i1.TranslationService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pYy1maWVsZC1jaGVja2JveC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzLWFpL3NyYy9saWIvY29tcG9uZW50cy9keW5hbWljLWZvcm0vZmllbGRzL2R5bmFtaWMtZmllbGQtY2hlY2tib3guY29tcG9uZW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