import { Component, Input, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/material/radio";
import * as i4 from "@angular/material/checkbox";
export 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
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0aW9uLWJ1dHRvbnMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NlbGVjdGlvbi1idXR0b25zL3NlbGVjdGlvbi1idXR0b25zLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9zZWxlY3Rpb24tYnV0dG9ucy9zZWxlY3Rpb24tYnV0dG9ucy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLEtBQUssRUFBRSxXQUFXLEVBQUMsTUFBTSxlQUFlLENBQUM7Ozs7OztBQVM1RCxNQUFNLE9BQU8seUJBQXlCO0lBTHRDO1FBUVcsYUFBUSxHQUFHLEtBQUssQ0FBQztRQUVqQixjQUFTLEdBQUcsS0FBSyxDQUFDO0tBUzVCO0lBUEMsSUFBSSxXQUFXO1FBQ2IsT0FBb0IsSUFBSSxDQUFDLElBQUksQ0FBQztJQUNoQyxDQUFDO0lBRUQsSUFBSSxTQUFTO1FBQ1g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