import * as i0 from '@angular/core';
import { Input, Component, NgModule } from '@angular/core';
import * as i2 from '@angular/forms';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { ProfileRepresentation } from '@aztrix/sdk';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i3 from '@angular/material/radio';
import { MatRadioModule } from '@angular/material/radio';
import * as i4 from '@angular/material/checkbox';
import { MatCheckboxModule } from '@angular/material/checkbox';
import * as i3$1 from '@aztrix/translate';
import { TranslatePipe } from '@aztrix/translate';

class SelectionButtonsComponent {
    constructor() {
        this.multiple = false;
        this.fullWidth = false;
    }
    get formControl() {
        return this.form;
    }
    get formGroup() {
        return this.form;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectionButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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]=\"formControl\"\n>\n  <mat-radio-button\n    class=\"selection-button form-button-select filled\"\n    *ngFor=\"let option of options\"\n    [value]=\"option\"\n  >\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]=\"formGroup\"\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 .mdc-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;padding-left:.5rem;cursor:pointer;min-width:0}:host ::ng-deep .selection-button label{padding:.5rem;align-items:center}:host ::ng-deep .selection-button.mat-mdc-radio-checked{--mdc-radio-selected-icon-color: var(--font-color, inherit);--mdc-radio-selected-hover-icon-color: var(--font-color, inherit);border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-mdc-checkbox-checked{border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-mdc-checkbox-checked .mdc-checkbox__background{background-color:var(--primary-color-500, inherit);border-color:var(--mdc-checkbox-selected-checkmark-color);border-radius:0}.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.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", 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]=\"formControl\"\n>\n  <mat-radio-button\n    class=\"selection-button form-button-select filled\"\n    *ngFor=\"let option of options\"\n    [value]=\"option\"\n  >\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]=\"formGroup\"\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 .mdc-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;padding-left:.5rem;cursor:pointer;min-width:0}:host ::ng-deep .selection-button label{padding:.5rem;align-items:center}:host ::ng-deep .selection-button.mat-mdc-radio-checked{--mdc-radio-selected-icon-color: var(--font-color, inherit);--mdc-radio-selected-hover-icon-color: var(--font-color, inherit);border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-mdc-checkbox-checked{border:1px solid var(--primary-color-500, inherit);background-color:var(--primary-color-500, inherit)}:host ::ng-deep .selection-button.mat-mdc-checkbox-checked .mdc-checkbox__background{background-color:var(--primary-color-500, inherit);border-color:var(--mdc-checkbox-selected-checkmark-color);border-radius:0}.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());
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProfileContextSelectionButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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: "17.3.12", 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 {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectionButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SelectionButtonsModule, declarations: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent], imports: [CommonModule,
            ReactiveFormsModule,
            FormsModule,
            MatRadioModule,
            MatCheckboxModule,
            TranslatePipe], exports: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectionButtonsModule, imports: [CommonModule,
            ReactiveFormsModule,
            FormsModule,
            MatRadioModule,
            MatCheckboxModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectionButtonsModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent],
                    imports: [
                        CommonModule,
                        ReactiveFormsModule,
                        FormsModule,
                        MatRadioModule,
                        MatCheckboxModule,
                        TranslatePipe,
                    ],
                    exports: [SelectionButtonsComponent, ProfileContextSelectionButtonsComponent],
                }]
        }] });

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

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