import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import { ProfileRepresentation } from '@aztrix/sdk';
import * as i2 from '@angular/forms';
import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i3 from '@angular/material/legacy-radio';
import { MatLegacyRadioModule } from '@angular/material/legacy-radio';
import * as i4 from '@angular/material/legacy-checkbox';
import { MatLegacyCheckboxModule } from '@angular/material/legacy-checkbox';
import * as i3$1 from '@aztrix/helpers';
import { HelperPipesModule } from '@aztrix/helpers';

class SelectionButtonsComponent {
    constructor() {
        this.form = new FormControl();
        this.multiple = false;
        this.fullWidth = false;
    }
}
SelectionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: SelectionButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
SelectionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: SelectionButtonsComponent, selector: "ax-selection-buttons", inputs: { form: "form", options: "options", multiple: "multiple", selectionTemplate: "selectionTemplate", fullWidth: "fullWidth" }, ngImport: i0, template: "<mat-radio-group\n  class=\"selection-group\"\n  [ngClass]=\"{'full-width': fullWidth}\"\n  *ngIf=\"!multiple\"\n  [formControl]=\"form\"\n>\n  <mat-radio-button class=\"selection-button\" *ngFor=\"let option of options\" [value]=\"option\">\n    <ng-container\n      *ngTemplateOutlet=\"selectionTemplate; context: {$implicit: option}\"\n    ></ng-container>\n  </mat-radio-button>\n</mat-radio-group>\n\n<section\n  class=\"selection-group\"\n  [ngClass]=\"{'full-width': fullWidth}\"\n  *ngIf=\"multiple\"\n  [formGroup]=\"form\"\n>\n  <mat-checkbox class=\"selection-button\" *ngFor=\"let option of options\" value>\n    <ng-container\n      *ngTemplateOutlet=\"selectionTemplate; context: {$implicit: option}\"\n    ></ng-container>\n  </mat-checkbox>\n</section>\n", styles: [":host ::ng-deep .mat-radio-outer-circle{border-width:1px}:host ::ng-deep .selection-button{border:1px solid var(--primary-color-500-contrast, inherit);border-radius:.6rem;transition:border-color .4s ease-in-out,background-color .4s ease-in-out}:host ::ng-deep .selection-button.mat-radio-checked{border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-radio-checked .mat-radio-outer-circle{border-color:var(--font-color, inherit)}:host ::ng-deep .selection-button.mat-radio-checked .mat-radio-inner-circle{background-color:var(--font-color, inherit)}:host ::ng-deep .selection-button.mat-checkbox-checked{border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-checkbox-checked .mat-checkbox-background{background-color:var(--primary-color-500, inherit);border-radius:0}:host ::ng-deep .selection-button label{padding:.5rem;align-items:center}.selection-group{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;padding:.75rem 0}.selection-group.full-width{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatLegacyRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatLegacyRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4.MatLegacyCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: SelectionButtonsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-selection-buttons', template: "<mat-radio-group\n  class=\"selection-group\"\n  [ngClass]=\"{'full-width': fullWidth}\"\n  *ngIf=\"!multiple\"\n  [formControl]=\"form\"\n>\n  <mat-radio-button class=\"selection-button\" *ngFor=\"let option of options\" [value]=\"option\">\n    <ng-container\n      *ngTemplateOutlet=\"selectionTemplate; context: {$implicit: option}\"\n    ></ng-container>\n  </mat-radio-button>\n</mat-radio-group>\n\n<section\n  class=\"selection-group\"\n  [ngClass]=\"{'full-width': fullWidth}\"\n  *ngIf=\"multiple\"\n  [formGroup]=\"form\"\n>\n  <mat-checkbox class=\"selection-button\" *ngFor=\"let option of options\" value>\n    <ng-container\n      *ngTemplateOutlet=\"selectionTemplate; context: {$implicit: option}\"\n    ></ng-container>\n  </mat-checkbox>\n</section>\n", styles: [":host ::ng-deep .mat-radio-outer-circle{border-width:1px}:host ::ng-deep .selection-button{border:1px solid var(--primary-color-500-contrast, inherit);border-radius:.6rem;transition:border-color .4s ease-in-out,background-color .4s ease-in-out}:host ::ng-deep .selection-button.mat-radio-checked{border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-radio-checked .mat-radio-outer-circle{border-color:var(--font-color, inherit)}:host ::ng-deep .selection-button.mat-radio-checked .mat-radio-inner-circle{background-color:var(--font-color, inherit)}:host ::ng-deep .selection-button.mat-checkbox-checked{border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-checkbox-checked .mat-checkbox-background{background-color:var(--primary-color-500, inherit);border-radius:0}:host ::ng-deep .selection-button label{padding:.5rem;align-items:center}.selection-group{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;padding:.75rem 0}.selection-group.full-width{width:100%}\n"] }]
        }], propDecorators: { form: [{
                type: Input
            }], options: [{
                type: Input
            }], multiple: [{
                type: Input
            }], selectionTemplate: [{
                type: Input
            }], fullWidth: [{
                type: Input
            }] } });

class ProfileContextSelectionButtonsComponent {
    constructor() {
        this.fullWidth = false;
        this.profileContextOptions = Object.values(ProfileRepresentation.ProfileContextEnum).map((profileContext) => profileContext.toString());
    }
}
ProfileContextSelectionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ProfileContextSelectionButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ProfileContextSelectionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: ProfileContextSelectionButtonsComponent, selector: "ax-profile-context-selection-buttons", inputs: { form: "form", fullWidth: "fullWidth" }, ngImport: i0, template: "<ax-selection-buttons\n  [selectionTemplate]=\"profileContext\"\n  [options]=\"profileContextOptions\"\n  [form]=\"form\"\n  [fullWidth]=\"fullWidth\"\n></ax-selection-buttons>\n\n<ng-template #profileContext let-option>\n  {{ 'label.' + option | lowercase | translate }}\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: SelectionButtonsComponent, selector: "ax-selection-buttons", inputs: ["form", "options", "multiple", "selectionTemplate", "fullWidth"] }, { kind: "pipe", type: i1.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ProfileContextSelectionButtonsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-profile-context-selection-buttons', template: "<ax-selection-buttons\n  [selectionTemplate]=\"profileContext\"\n  [options]=\"profileContextOptions\"\n  [form]=\"form\"\n  [fullWidth]=\"fullWidth\"\n></ax-selection-buttons>\n\n<ng-template #profileContext let-option>\n  {{ 'label.' + option | lowercase | translate }}\n</ng-template>\n" }]
        }], propDecorators: { form: [{
                type: Input
            }], fullWidth: [{
                type: Input
            }] } });

class SelectionButtonsModule {
}
SelectionButtonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: SelectionButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
SelectionButtonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: SelectionButtonsModule, declarations: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent], imports: [CommonModule,
        ReactiveFormsModule,
        FormsModule,
        MatLegacyRadioModule,
        MatLegacyCheckboxModule,
        HelperPipesModule], exports: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent] });
SelectionButtonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: SelectionButtonsModule, imports: [CommonModule,
        ReactiveFormsModule,
        FormsModule,
        MatLegacyRadioModule,
        MatLegacyCheckboxModule,
        HelperPipesModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: SelectionButtonsModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent],
                    imports: [
                        CommonModule,
                        ReactiveFormsModule,
                        FormsModule,
                        MatLegacyRadioModule,
                        MatLegacyCheckboxModule,
                        HelperPipesModule,
                    ],
                    exports: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent],
                }]
        }] });

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

export { ProfileContextSelectionButtonsComponent, SelectionButtonsComponent, SelectionButtonsModule };
//# sourceMappingURL=aztrix-components-selection-buttons.mjs.map
//# sourceMappingURL=aztrix-components-selection-buttons.mjs.map
