import { __decorate } from "tslib";
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { ReactiveFormsModule } from '@angular/forms';
import { FormComponentControlSAPipe, FormComponentBase } from '@anglr/dynamic/form';
import { LayoutEditorMetadata } from '@anglr/dynamic/layout-editor';
import { RelationsEditorMetadata } from '@anglr/dynamic/relations-editor';
import { CastPipesModule, HostDisplayBlockStyle } from '@anglr/common';
import { FormPipesModule } from '@anglr/common/forms';
import { MaterialTextFieldLayoutMetadataLoader, MaterialTextFieldRelationsMetadataLoader } from './textField.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/material/form-field";
import * as i4 from "@angular/material/input";
import * as i5 from "@angular/forms";
/**
 * Component used for displaying material text field
 */
let MaterialTextFieldSAComponent = class MaterialTextFieldSAComponent extends FormComponentBase {
};
MaterialTextFieldSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: MaterialTextFieldSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
MaterialTextFieldSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: MaterialTextFieldSAComponent, isStandalone: true, selector: "material-text-field", usesInheritance: true, ngImport: i0, template: "<mat-form-field [appearance]=\"options?.appearance|asRequired\">\n    <mat-label>{{options?.label}}</mat-label>\n    <input matInput [attr.placeholder]=\"options?.placeholder\" [formControl]=\"control|asFormControl|asRequired\">\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: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
MaterialTextFieldSAComponent = __decorate([
    RelationsEditorMetadata(MaterialTextFieldRelationsMetadataLoader),
    LayoutEditorMetadata(MaterialTextFieldLayoutMetadataLoader)
], MaterialTextFieldSAComponent);
export { MaterialTextFieldSAComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: MaterialTextFieldSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'material-text-field', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
                        FormPipesModule,
                        CastPipesModule,
                        FormComponentControlSAPipe,
                        MatFormFieldModule,
                        MatInputModule,
                        ReactiveFormsModule,
                        CommonModule,
                    ], template: "<mat-form-field [appearance]=\"options?.appearance|asRequired\">\n    <mat-label>{{options?.label}}</mat-label>\n    <input matInput [attr.placeholder]=\"options?.placeholder\" [formControl]=\"control|asFormControl|asRequired\">\n    <mat-hint>{{options?.hint}}</mat-hint>\n</mat-form-field>", styles: [":host{display: block;}"] }]
        }] });
//# sourceMappingURL=textField.component.js.map