import * as i0 from '@angular/core';
import { EventEmitter, Component, Input, Output } from '@angular/core';
import { NgFor, NgIf, NgClass } from '@angular/common';
import * as i2 from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import * as i1 from '@angular/material/radio';
import { MatRadioModule } from '@angular/material/radio';
import { MatFormFieldModule } from '@angular/material/form-field';
import * as i3 from '@angular/material/button-toggle';
import { MatButtonToggleModule } from '@angular/material/button-toggle';

class LdcRadioButtonComponent {
    constructor() {
        this.optionsList = [];
        this.isDisabled = false;
        this.isRequired = false;
        this.isToggle = false;
        this.inputValueChanged = new EventEmitter();
    }
    onInputChanged(event) {
        this.inputValueChanged.emit(event?.target?.value);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LdcRadioButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LdcRadioButtonComponent, isStandalone: true, selector: "lib-ldc-radio-button", inputs: { controller: "controller", label: "label", className: "className", optionsList: "optionsList", isDisabled: "isDisabled", isRequired: "isRequired", isToggle: "isToggle" }, outputs: { inputValueChanged: "inputValueChanged" }, ngImport: i0, template: "<div class=\"ldc-toggle__btn\">\r\n  <label class=\"ldc-label\"\r\n    >{{ label }}\r\n    <small *ngIf=\"isRequired\" class=\"font-14 text-danger\">*</small>\r\n  </label>\r\n  <mat-radio-group\r\n    class=\"{{ className }}\"\r\n    [formControl]=\"controller\"\r\n    [disabled]=\"isDisabled\"\r\n    [required]=\"isRequired\"\r\n    *ngIf=\"!isToggle\"\r\n  >\r\n    <mat-radio-button\r\n      class=\"{{ className }}\"\r\n      *ngFor=\"let option of optionsList\"\r\n      [value]=\"option.key\"\r\n      [checked]=\"option.isChecked\"\r\n      (change)=\"onInputChanged($event)\"\r\n    >\r\n      {{ option.value }}\r\n    </mat-radio-button>\r\n  </mat-radio-group>\r\n\r\n  <mat-button-toggle-group\r\n    *ngIf=\"isToggle\"\r\n    class=\"{{ className }}\"\r\n    [formControl]=\"controller\"\r\n    aria-label=\"Font Style\"\r\n  >\r\n    <mat-button-toggle\r\n      *ngFor=\"let option of optionsList\"\r\n      [value]=\"option.key\"\r\n      class=\"ldc-status-btn ldc-{{ option.class }}\"\r\n      [checked]=\"option.isChecked\"\r\n    >\r\n      {{ option.value }}\r\n    </mat-button-toggle>\r\n  </mat-button-toggle-group>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LdcRadioButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'lib-ldc-radio-button', standalone: true, imports: [
                        MatRadioModule,
                        NgFor,
                        MatFormFieldModule,
                        ReactiveFormsModule,
                        MatButtonToggleModule,
                        NgIf,
                        NgClass
                    ], template: "<div class=\"ldc-toggle__btn\">\r\n  <label class=\"ldc-label\"\r\n    >{{ label }}\r\n    <small *ngIf=\"isRequired\" class=\"font-14 text-danger\">*</small>\r\n  </label>\r\n  <mat-radio-group\r\n    class=\"{{ className }}\"\r\n    [formControl]=\"controller\"\r\n    [disabled]=\"isDisabled\"\r\n    [required]=\"isRequired\"\r\n    *ngIf=\"!isToggle\"\r\n  >\r\n    <mat-radio-button\r\n      class=\"{{ className }}\"\r\n      *ngFor=\"let option of optionsList\"\r\n      [value]=\"option.key\"\r\n      [checked]=\"option.isChecked\"\r\n      (change)=\"onInputChanged($event)\"\r\n    >\r\n      {{ option.value }}\r\n    </mat-radio-button>\r\n  </mat-radio-group>\r\n\r\n  <mat-button-toggle-group\r\n    *ngIf=\"isToggle\"\r\n    class=\"{{ className }}\"\r\n    [formControl]=\"controller\"\r\n    aria-label=\"Font Style\"\r\n  >\r\n    <mat-button-toggle\r\n      *ngFor=\"let option of optionsList\"\r\n      [value]=\"option.key\"\r\n      class=\"ldc-status-btn ldc-{{ option.class }}\"\r\n      [checked]=\"option.isChecked\"\r\n    >\r\n      {{ option.value }}\r\n    </mat-button-toggle>\r\n  </mat-button-toggle-group>\r\n</div>\r\n" }]
        }], propDecorators: { controller: [{
                type: Input
            }], label: [{
                type: Input,
                args: [{ required: true }]
            }], className: [{
                type: Input
            }], optionsList: [{
                type: Input,
                args: [{ required: true }]
            }], isDisabled: [{
                type: Input
            }], isRequired: [{
                type: Input
            }], isToggle: [{
                type: Input
            }], inputValueChanged: [{
                type: Output
            }] } });

/**
 * Generated bundle index. Do not edit.
 */

export { LdcRadioButtonComponent };
//# sourceMappingURL=testlocallibrary-shared-kernel-components-ldc-form-ldc-fields-ldc-radio-button.mjs.map
