import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core';
import { AbstractPropertyEdit } from '../abstract-property-edit';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/material/legacy-form-field";
import * as i4 from "@angular/material/legacy-radio";
import * as i5 from "@aztrix/icons";
import * as i6 from "../property-error/property-error.component";
import * as i7 from "@aztrix/components/clear-button";
import * as i8 from "@aztrix/components/property-published-button";
import * as i9 from "@aztrix/helpers";
export class GenderEditComponent extends AbstractPropertyEdit {
    constructor() {
        super(...arguments);
        this.propertyEditClass = true;
    }
    get showIconClass() {
        return this.showIcon;
    }
}
GenderEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: GenderEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
GenderEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: GenderEditComponent, selector: "ax-gender-edit", host: { properties: { "class.c-property-edit": "this.propertyEditClass", "class.showIcon": "this.showIconClass" } }, usesInheritance: true, ngImport: i0, template: "<ax-icon\n  *ngIf=\"showIcon\"\n  class=\"icon type-icon\"\n  [name]=\"PropertyType.GENDER | propertyIcon\"\n></ax-icon>\n<div>\n  <div class=\"header\">\n    <div class=\"title\">\n      <label class=\"label\"\n        >{{ customLabel === '' ? (form.getRawValue() | propertyTypeLabel) : customLabel\n        }}<span *ngIf=\"required\">&nbsp;*</span></label\n      >\n      <ax-property-published-button *ngIf=\"published\"></ax-property-published-button>\n    </div>\n    <ax-clear-button\n      matSuffix\n      [form]=\"valueControl\"\n      *ngIf=\"hasValue && !valueControl.disabled\"\n    ></ax-clear-button>\n  </div>\n  <mat-radio-group [name]=\"getName()\" class=\"radio\" [formControl]=\"valueControl\">\n    <mat-radio-button value=\"M\" class=\"radio-item\" type=\"radio\">\n      {{ 'label.male' | translate }}\n    </mat-radio-button>\n    <mat-radio-button value=\"F\" class=\"radio-item\" type=\"radio\">\n      {{ 'label.female' | translate }}\n    </mat-radio-button>\n  </mat-radio-group>\n  <div class=\"hint-wrapper\">\n    <mat-hint\n      [ngClass]=\"{collapsed}\"\n      (click)=\"collapsed = !collapsed\"\n      class=\"hint collapsible\"\n      align=\"end\"\n      #hintElement\n    >\n      <div><ax-icon *ngIf=\"isOverflowing()\" class=\"icon\" name=\"chevron-down\"></ax-icon></div>\n      <span [ngClass]=\"{overflowing: isOverflowing()}\">{{ hint }}</span>\n    </mat-hint>\n  </div>\n  <ax-property-error *ngIf=\"valueControl.touched\" [form]=\"form\"></ax-property-error>\n</div>\n", styles: [":host{position:relative}:host ::ng-deep ax-property-published-button{position:unset}:host ::ng-deep ax-clear-button{height:20px}.radio{display:flex;flex-direction:column;margin-top:.5rem}.radio-item{padding-bottom:.5rem}.radio-item:last-child{padding-bottom:0}.header{display:flex;justify-content:space-between}.header button{margin:-6px 0}.title{display:flex;align-items:center}\n", ":host .type-icon{display:none}:host.showIcon{display:grid;grid-template-columns:38px 1fr}:host.showIcon .type-icon{display:inline}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatLegacyHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLegacySuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4.MatLegacyRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i4.MatLegacyRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i5.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "component", type: i6.PropertyErrorComponent, selector: "ax-property-error", inputs: ["form", "label"] }, { kind: "component", type: i7.ClearButtonComponent, selector: "ax-clear-button", inputs: ["form"] }, { kind: "component", type: i8.PropertyPublishedButtonComponent, selector: "ax-property-published-button" }, { kind: "pipe", type: i9.PropertyTypeLabelPipe, name: "propertyTypeLabel" }, { kind: "pipe", type: i9.PropertyIconPipe, name: "propertyIcon" }, { kind: "pipe", type: i9.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: GenderEditComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-gender-edit', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-icon\n  *ngIf=\"showIcon\"\n  class=\"icon type-icon\"\n  [name]=\"PropertyType.GENDER | propertyIcon\"\n></ax-icon>\n<div>\n  <div class=\"header\">\n    <div class=\"title\">\n      <label class=\"label\"\n        >{{ customLabel === '' ? (form.getRawValue() | propertyTypeLabel) : customLabel\n        }}<span *ngIf=\"required\">&nbsp;*</span></label\n      >\n      <ax-property-published-button *ngIf=\"published\"></ax-property-published-button>\n    </div>\n    <ax-clear-button\n      matSuffix\n      [form]=\"valueControl\"\n      *ngIf=\"hasValue && !valueControl.disabled\"\n    ></ax-clear-button>\n  </div>\n  <mat-radio-group [name]=\"getName()\" class=\"radio\" [formControl]=\"valueControl\">\n    <mat-radio-button value=\"M\" class=\"radio-item\" type=\"radio\">\n      {{ 'label.male' | translate }}\n    </mat-radio-button>\n    <mat-radio-button value=\"F\" class=\"radio-item\" type=\"radio\">\n      {{ 'label.female' | translate }}\n    </mat-radio-button>\n  </mat-radio-group>\n  <div class=\"hint-wrapper\">\n    <mat-hint\n      [ngClass]=\"{collapsed}\"\n      (click)=\"collapsed = !collapsed\"\n      class=\"hint collapsible\"\n      align=\"end\"\n      #hintElement\n    >\n      <div><ax-icon *ngIf=\"isOverflowing()\" class=\"icon\" name=\"chevron-down\"></ax-icon></div>\n      <span [ngClass]=\"{overflowing: isOverflowing()}\">{{ hint }}</span>\n    </mat-hint>\n  </div>\n  <ax-property-error *ngIf=\"valueControl.touched\" [form]=\"form\"></ax-property-error>\n</div>\n", styles: [":host{position:relative}:host ::ng-deep ax-property-published-button{position:unset}:host ::ng-deep ax-clear-button{height:20px}.radio{display:flex;flex-direction:column;margin-top:.5rem}.radio-item{padding-bottom:.5rem}.radio-item:last-child{padding-bottom:0}.header{display:flex;justify-content:space-between}.header button{margin:-6px 0}.title{display:flex;align-items:center}\n", ":host .type-icon{display:none}:host.showIcon{display:grid;grid-template-columns:38px 1fr}:host.showIcon .type-icon{display:inline}\n"] }]
        }], propDecorators: { propertyEditClass: [{
                type: HostBinding,
                args: ['class.c-property-edit']
            }], showIconClass: [{
                type: HostBinding,
                args: ['class.showIcon']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZGVyLWVkaXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3Byb3BlcnR5LWVkaXQvZ2VuZGVyLWVkaXQvZ2VuZGVyLWVkaXQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3Byb3BlcnR5LWVkaXQvZ2VuZGVyLWVkaXQvZ2VuZGVyLWVkaXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxXQUFXLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFOUUsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sMkJBQTJCLENBQUM7Ozs7Ozs7Ozs7O0FBUS9ELE1BQU0sT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