import { Component } 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-core";
import * as i5 from "@angular/material/legacy-select";
import * as i6 from "@aztrix/icons";
import * as i7 from "@aztrix/components/clear-button";
import * as i8 from "@aztrix/components/property-published-button";
import * as i9 from "@aztrix/helpers";
export const ORGANISATION_TYPES = ['professional', 'company', 'non-profit'];
export class OrganisationTypeEditComponent extends AbstractPropertyEdit {
    constructor() {
        super(...arguments);
        this.types = ORGANISATION_TYPES;
    }
}
OrganisationTypeEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: OrganisationTypeEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
OrganisationTypeEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: OrganisationTypeEditComponent, selector: "ax-organisation-type-edit", usesInheritance: true, ngImport: i0, template: "<ax-icon\n  *ngIf=\"showIcon\"\n  class=\"icon type-icon\"\n  [name]=\"PropertyType.ORGANISATION_TYPE | propertyIcon\"\n></ax-icon>\n<mat-form-field appearance=\"outline\" class=\"c-input\" style=\"width: 100%\">\n  <mat-label>\n    {{ customLabel === '' ? (type | propertyTypeLabel) : customLabel\n    }}<span *ngIf=\"required\">*</span>\n  </mat-label>\n  <mat-select\n    disableOptionCentering\n    [placeholder]=\"PropertyType.ORGANISATION_TYPE | propertyTypeLabel\"\n    [formControl]=\"form.get('value')\"\n  >\n    <mat-option *ngFor=\"let type of types\" [value]=\"type\">\n      {{ 'property.organisation-type.' + type | translate }}\n    </mat-option>\n  </mat-select>\n  <mat-hint *ngIf=\"hint\" align=\"end\">\n    <span>{{ hint }}</span>\n  </mat-hint>\n  <mat-error>\n    <ax-icon name=\"alert-circle\"></ax-icon>\n    {{\n      'property.validation.required'\n        | translate: {propertyType: 'property.CATEGORY.label' | translate}\n    }}\n  </mat-error>\n  <ax-clear-button *ngIf=\"form.value\" [form]=\"form\" matSuffix></ax-clear-button>\n</mat-form-field>\n<ax-property-published-button *ngIf=\"published\"></ax-property-published-button>\n", styles: [""], dependencies: [{ 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: 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.MatLegacyError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLegacyHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLegacyLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatLegacySuffix, selector: "[matSuffix]" }, { kind: "component", type: i4.MatLegacyOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatLegacySelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { 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" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: OrganisationTypeEditComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-organisation-type-edit', template: "<ax-icon\n  *ngIf=\"showIcon\"\n  class=\"icon type-icon\"\n  [name]=\"PropertyType.ORGANISATION_TYPE | propertyIcon\"\n></ax-icon>\n<mat-form-field appearance=\"outline\" class=\"c-input\" style=\"width: 100%\">\n  <mat-label>\n    {{ customLabel === '' ? (type | propertyTypeLabel) : customLabel\n    }}<span *ngIf=\"required\">*</span>\n  </mat-label>\n  <mat-select\n    disableOptionCentering\n    [placeholder]=\"PropertyType.ORGANISATION_TYPE | propertyTypeLabel\"\n    [formControl]=\"form.get('value')\"\n  >\n    <mat-option *ngFor=\"let type of types\" [value]=\"type\">\n      {{ 'property.organisation-type.' + type | translate }}\n    </mat-option>\n  </mat-select>\n  <mat-hint *ngIf=\"hint\" align=\"end\">\n    <span>{{ hint }}</span>\n  </mat-hint>\n  <mat-error>\n    <ax-icon name=\"alert-circle\"></ax-icon>\n    {{\n      'property.validation.required'\n        | translate: {propertyType: 'property.CATEGORY.label' | translate}\n    }}\n  </mat-error>\n  <ax-clear-button *ngIf=\"form.value\" [form]=\"form\" matSuffix></ax-clear-button>\n</mat-form-field>\n<ax-property-published-button *ngIf=\"published\"></ax-property-published-button>\n" }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JnYW5pc2F0aW9uLXR5cGUtZWRpdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvcHJvcGVydHktZWRpdC9vcmdhbmlzYXRpb24tdHlwZS1lZGl0L29yZ2FuaXNhdGlvbi10eXBlLWVkaXQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3Byb3BlcnR5LWVkaXQvb3JnYW5pc2F0aW9uL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