import { Component } from '@angular/core';
import { VerificationStatus } from '@aztrix/models';
import { ReplaySubject } from 'rxjs';
import { AutocompletionComponent } from '../autocompletion.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/autocomplete";
import * as i3 from "@angular/material/core";
import * as i4 from "@aztrix/icons";
import * as i5 from "@aztrix/helpers";
export class EditAutocompletionComponent extends AutocompletionComponent {
    constructor() {
        super(...arguments);
        this.properties$ = new ReplaySubject(1);
        // eslint-disable-next-line @typescript-eslint/naming-convention
        this.VerificationStatus = VerificationStatus;
    }
    autocomplete(properties) {
        this.properties$.next(properties);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditAutocompletionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditAutocompletionComponent, selector: "ax-edit-autocompletion", usesInheritance: true, ngImport: i0, template: "<mat-autocomplete class=\"autocomplete\" #autocompletor=\"matAutocomplete\">\n  <mat-option\n    class=\"autocomplete-option\"\n    *ngFor=\"let property of properties$ | async\"\n    [value]=\"property | propertyDisplayValue: undefined:true\"\n  >\n    {{ property | propertyDisplayValue }}\n    <ax-icon\n      *ngIf=\"property.verification === VerificationStatus.VERIFIED\"\n      class=\"post-icon green-text\"\n      name=\"custom:verified\"\n    ></ax-icon>\n  </mat-option>\n</mat-autocomplete>\n", styles: [".autocomplete-option{height:auto;padding-top:.5rem;padding-bottom:.5rem}.autocomplete-option ::ng-deep .mdc-list-item__primary-text{display:flex;align-items:center}.autocomplete-option ::ng-deep .mdc-list-item__primary-text .icon{margin-right:.5rem;flex-shrink:0}.autocomplete-option ::ng-deep .mdc-list-item__primary-text .post-icon{width:1rem;height:1rem;margin-left:.25rem;vertical-align:text-bottom}\n"], 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: "component", type: i2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PropertyDisplayValuePipe, name: "propertyDisplayValue" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditAutocompletionComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-edit-autocompletion', template: "<mat-autocomplete class=\"autocomplete\" #autocompletor=\"matAutocomplete\">\n  <mat-option\n    class=\"autocomplete-option\"\n    *ngFor=\"let property of properties$ | async\"\n    [value]=\"property | propertyDisplayValue: undefined:true\"\n  >\n    {{ property | propertyDisplayValue }}\n    <ax-icon\n      *ngIf=\"property.verification === VerificationStatus.VERIFIED\"\n      class=\"post-icon green-text\"\n      name=\"custom:verified\"\n    ></ax-icon>\n  </mat-option>\n</mat-autocomplete>\n", styles: [".autocomplete-option{height:auto;padding-top:.5rem;padding-bottom:.5rem}.autocomplete-option ::ng-deep .mdc-list-item__primary-text{display:flex;align-items:center}.autocomplete-option ::ng-deep .mdc-list-item__primary-text .icon{margin-right:.5rem;flex-shrink:0}.autocomplete-option ::ng-deep .mdc-list-item__primary-text .post-icon{width:1rem;height:1rem;margin-left:.25rem;vertical-align:text-bottom}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ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