import { CommonModule } from '@angular/common';
import { Component, inject, input } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgmDensityDirective } from '@metad/ocap-angular/core';
import { NgxControlValueAccessor } from 'ngxtension/control-value-accessor';
import * as i0 from "@angular/core";
import * as i1 from "@metad/ocap-angular/core";
import * as i2 from "ngxtension/control-value-accessor";
import * as i3 from "@angular/forms";
let checkboxId = 0;
export class NgmCheckboxComponent {
    constructor() {
        this.id = checkboxId++;
        this.cva = inject(NgxControlValueAccessor);
        this.label = input();
        this.value$ = this.cva.value$;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgmCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: NgmCheckboxComponent, isStandalone: true, selector: "ngm-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgmDensityDirective, inputs: ["small", "small", "large", "large"] }, { directive: i2.NgxControlValueAccessor }], ngImport: i0, template: "<input id=\"checkbox-{{id}}\" type=\"checkbox\" [(ngModel)]=\"value$\" class=\"w-5 h-5 appearance-none border cursor-pointer border-gray-300 rounded-md mr-2 hover:border-indigo-500 hover:bg-indigo-100 checked:bg-no-repeat checked:bg-center checked:border-indigo-500 checked:bg-indigo-100\">\n<label for=\"checkbox-{{id}}\" class=\"grow font-norma cursor-pointer\">\n  {{label()}}\n</label>", styles: [":host{display:flex;align-items:center;justify-content:flex-start}input[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='blue'%3E%3Cpath d='M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z'%3E%3C/path%3E%3C/svg%3E\")}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgmCheckboxComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [
                        CommonModule,
                        FormsModule,
                    ], selector: 'ngm-checkbox', hostDirectives: [
                        {
                            directive: NgmDensityDirective,
                            inputs: ['small', 'large']
                        },
                        NgxControlValueAccessor
                    ], template: "<input id=\"checkbox-{{id}}\" type=\"checkbox\" [(ngModel)]=\"value$\" class=\"w-5 h-5 appearance-none border cursor-pointer border-gray-300 rounded-md mr-2 hover:border-indigo-500 hover:bg-indigo-100 checked:bg-no-repeat checked:bg-center checked:border-indigo-500 checked:bg-indigo-100\">\n<label for=\"checkbox-{{id}}\" class=\"grow font-norma cursor-pointer\">\n  {{label()}}\n</label>", styles: [":host{display:flex;align-items:center;justify-content:flex-start}input[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='blue'%3E%3Cpath d='M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z'%3E%3C/path%3E%3C/svg%3E\")}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4v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