import { __decorate } from "tslib";
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
import { LayoutEditorMetadata } from '@anglr/dynamic/layout-editor';
import { CastPipesModule, HostDisplayBlockStyle } from '@anglr/common';
import { FormPipesModule } from '@anglr/common/forms';
import { FormComponentBase, FormComponentControlSAPipe } from '@anglr/dynamic/form';
import { RelationsEditorMetadata } from '@anglr/dynamic/relations-editor';
import { MaterialSelectLayoutMetadataLoader, MaterialSelectRelationsMetadataLoader } from './select.metadata';
import * as i0 from "@angular/core";
import * as i1 from "@anglr/common/forms";
import * as i2 from "@anglr/common";
import * as i3 from "@angular/forms";
import * as i4 from "@angular/common";
import * as i5 from "@angular/material/form-field";
import * as i6 from "@angular/material/select";
import * as i7 from "@angular/material/core";
/**
 * Component used for displaying material text field
 */
let MaterialSelectSAComponent = class MaterialSelectSAComponent extends FormComponentBase {
    constructor() {
        super(...arguments);
        //######################### public properties #########################
        this._values = [
            {
                code: 'foo',
                value: 'foo value',
            },
            {
                code: 'bar',
                value: 'bar value',
            }
        ];
    }
    //######################### poublic properties - inputs and outputs #########################
    /**
     * Indication whether form component is disabled
     */
    set values(value) {
        this._values = value;
    }
    get values() {
        return this._values;
    }
};
MaterialSelectSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: MaterialSelectSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
MaterialSelectSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: MaterialSelectSAComponent, isStandalone: true, selector: "material-select", inputs: { values: "values" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [appearance]=\"options?.appearance|asRequired\">\n    <mat-label>{{options?.label}}</mat-label>\n    <mat-select [multiple]=\"options?.multiple\" [formControl]=\"control|asFormControl|asRequired\">\n        <mat-option *ngFor=\"let value of values\" [value]=\"value?.code\">{{value?.value}}</mat-option>\n    </mat-select>\n    <mat-hint>{{options?.hint}}</mat-hint>\n</mat-form-field>", styles: [":host{display: block;}"], dependencies: [{ kind: "ngmodule", type: FormPipesModule }, { kind: "pipe", type: i1.AsFormControlPipe, name: "asFormControl" }, { kind: "ngmodule", type: CastPipesModule }, { kind: "pipe", type: i2.AsRequiredTypePipe, name: "asRequired" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "aria-describedby", "panelClass", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
MaterialSelectSAComponent = __decorate([
    RelationsEditorMetadata(MaterialSelectRelationsMetadataLoader),
    LayoutEditorMetadata(MaterialSelectLayoutMetadataLoader)
], MaterialSelectSAComponent);
export { MaterialSelectSAComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: MaterialSelectSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'material-select', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
                        FormPipesModule,
                        CastPipesModule,
                        FormComponentControlSAPipe,
                        ReactiveFormsModule,
                        CommonModule,
                        MatFormFieldModule,
                        MatSelectModule,
                    ], template: "<mat-form-field [appearance]=\"options?.appearance|asRequired\">\n    <mat-label>{{options?.label}}</mat-label>\n    <mat-select [multiple]=\"options?.multiple\" [formControl]=\"control|asFormControl|asRequired\">\n        <mat-option *ngFor=\"let value of values\" [value]=\"value?.code\">{{value?.value}}</mat-option>\n    </mat-select>\n    <mat-hint>{{options?.hint}}</mat-hint>\n</mat-form-field>", styles: [":host{display: block;}"] }]
        }], propDecorators: { values: [{
                type: Input
            }] } });
//# sourceMappingURL=select.component.js.map