import { Component, Input, Output } from "@angular/core";
import { ValueField } from "../value-field";
import * as i0 from "@angular/core";
import * as i1 from "../form-field-label.component";
import * as i2 from "@angular/common";
import * as i3 from "@angular/forms";
export class TextFieldComponent {
}
TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: TextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: TextFieldComponent, selector: "path-textfield", inputs: { field: "field" }, outputs: { field: "field" }, ngImport: i0, template: "<span class=\"row\">\r\n<path-form-field-label [class.col-sm-4]=\"field.width == 1\" [class.col-sm-2]=\"field.width == 2\" [label]=\"field.name\" [required]=\"field.required\"></path-form-field-label>\r\n<div [class.col-sm-8]=\"field.width == 1\" [class.col-sm-10]=\"field.width == 2\">\r\n    <input *ngIf=\"!field.isPassword && (field.height == null || field.height <= 1)\" #model=\"ngModel\" [readonly]=\"field.isReadonly()\" [class.required-field]=\"(!model.valid &&!model.pristine && field.required)\" [required]=\"field.required\" [(ngModel)]=field.value [attr.maxlength]=\"field.maxLength\" type=\"text\" class=\"form-control\" placeholder=\"\">\r\n    <textarea *ngIf=\"!field.isPassword && (field.height != null && field.height > 1)\" #model=\"ngModel\" [readonly]=\"field.isReadonly()\" [class.required-field]=\"(!model.valid &&!model.pristine && field.required)\" [required]=\"field.required\" [(ngModel)]=field.value rows=\"{{field.height}}\" [attr.maxlength]=\"field.maxLength\" type=\"text\" class=\"form-control\" placeholder=\"\"></textarea>\r\n    <input *ngIf=\"field.isPassword\" #model=\"ngModel\" [readonly]=\"field.isReadonly()\" [class.required-field]=\"(!model.valid &&!model.pristine && field.required)\" [required]=\"field.required\" [(ngModel)]=field.value [attr.maxlength]=\"field.maxLength\" type=\"password\" class=\"form-control\" placeholder=\"\">\r\n</div>\r\n</span>", components: [{ type: i1.FormFieldLabelComponent, selector: "path-form-field-label", inputs: ["label", "required"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: TextFieldComponent, decorators: [{
            type: Component,
            args: [{ selector: "path-textfield", template: "<span class=\"row\">\r\n<path-form-field-label [class.col-sm-4]=\"field.width == 1\" [class.col-sm-2]=\"field.width == 2\" [label]=\"field.name\" [required]=\"field.required\"></path-form-field-label>\r\n<div [class.col-sm-8]=\"field.width == 1\" [class.col-sm-10]=\"field.width == 2\">\r\n    <input *ngIf=\"!field.isPassword && (field.height == null || field.height <= 1)\" #model=\"ngModel\" [readonly]=\"field.isReadonly()\" [class.required-field]=\"(!model.valid &&!model.pristine && field.required)\" [required]=\"field.required\" [(ngModel)]=field.value [attr.maxlength]=\"field.maxLength\" type=\"text\" class=\"form-control\" placeholder=\"\">\r\n    <textarea *ngIf=\"!field.isPassword && (field.height != null && field.height > 1)\" #model=\"ngModel\" [readonly]=\"field.isReadonly()\" [class.required-field]=\"(!model.valid &&!model.pristine && field.required)\" [required]=\"field.required\" [(ngModel)]=field.value rows=\"{{field.height}}\" [attr.maxlength]=\"field.maxLength\" type=\"text\" class=\"form-control\" placeholder=\"\"></textarea>\r\n    <input *ngIf=\"field.isPassword\" #model=\"ngModel\" [readonly]=\"field.isReadonly()\" [class.required-field]=\"(!model.valid &&!model.pristine && field.required)\" [required]=\"field.required\" [(ngModel)]=field.value [attr.maxlength]=\"field.maxLength\" type=\"password\" class=\"form-control\" placeholder=\"\">\r\n</div>\r\n</span>" }]
        }], propDecorators: { field: [{
                type: Input,
                args: ["field"]
            }, {
                type: Output,
                args: ["field"]
            }] } });
export class TextField extends ValueField {
    constructor() {
        super(...arguments);
        this._isPassword = false;
        this._maxLength = 250;
    }
    get isPassword() {
        return this._isPassword;
    }
    set isPassword(value) {
        this._isPassword = value;
    }
    get maxLength() {
        return this._maxLength;
    }
    set maxLength(value) {
        this._maxLength = value;
    }
    fromJson(modelFormField) {
        super.fromJson(modelFormField);
        if (modelFormField["isPassword"] != null) {
            this.isPassword = (modelFormField["isPassword"]);
        }
        if (modelFormField["maxLength"] != null) {
            this.maxLength = (modelFormField["maxLength"]);
        }
    }
}
//# sourceMappingURL=data:application/json;base64, 