/**
 * @fileoverview added by tsickle
 * Generated from: lib/ui-components/tap-variable-text/tap-variable-text.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { __decorate, __extends, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
import { AppGenComponent, AppGenField } from '../../metadata/decorators';
import { stringToRegex } from '../../utility';
import { MonitoringVariableValueComponent } from '../monitoring-variable-value/monitoring-variable-value.component';
var TapVariableTextComponent = /** @class */ (function (_super) {
    __extends(TapVariableTextComponent, _super);
    function TapVariableTextComponent() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.inputOptions = {
            type: 'text'
        };
        return _this;
    }
    Object.defineProperty(TapVariableTextComponent.prototype, "pattern", {
        set: /**
         * @param {?} regex
         * @return {?}
         */
        function (regex) {
            if (typeof regex == 'string') {
                regex = stringToRegex(regex);
            }
            this.inputOptions.pattern = regex;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TapVariableTextComponent.prototype, "minLength", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.inputOptions.minLength = value || 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TapVariableTextComponent.prototype, "maxLength", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.inputOptions.maxLength = value || 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TapVariableTextComponent.prototype, "placeholder", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.inputOptions.placeholder = value;
        },
        enumerable: true,
        configurable: true
    });
    TapVariableTextComponent.decorators = [
        { type: Component, args: [{
                    selector: 'tap-variable-text',
                    template: "\r\n<tap-inline-editor *ngIf=\"_variable && valuesStream\"\r\n    [forceValue]=\"forceValue\"\r\n    [lines]=\"lines\"\r\n    [value]=\"valuesStream\" \r\n    [loading]=\"loading\" \r\n    [waitForSubmit]=\"pending\"\r\n    [toggleTextRight]=\"textOnRight\"\r\n    [toggleTextLeft]=\"textOnLeft\"\r\n    [(editMode)]=\"editMode\"\r\n    [editable]=\"editable\"\r\n    [fieldError]=\"fieldError\"\r\n    [inputOptions]=\"inputOptions\"\r\n    [unitValue]=\"unitValue\"\r\n    [valueStyle]=\"valueStyle\"\r\n    [pendingSubmitValue]=\"pendingSubmitValue\"\r\n    (onSubmit)=\"onSubmit($event)\"\r\n    (onRefresh)=\"onRefresh($event)\"\r\n    (onCancelEdit)=\"onCancelEdit($event)\"\r\n    >\r\n</tap-inline-editor>",
                    styles: [""]
                }] }
    ];
    TapVariableTextComponent.propDecorators = {
        pattern: [{ type: Input }],
        minLength: [{ type: Input }],
        maxLength: [{ type: Input }],
        placeholder: [{ type: Input }]
    };
    __decorate([
        AppGenField({
            schema: {
                type: 'string',
                description: 'Regex pattern used to validate string'
            }
        }),
        __metadata("design:type", Object),
        __metadata("design:paramtypes", [Object])
    ], TapVariableTextComponent.prototype, "pattern", null);
    __decorate([
        AppGenField({
            schema: {
                type: 'integer',
                minimum: 0,
                description: 'Minimum input length',
                default: 0
            }
        }),
        __metadata("design:type", Object),
        __metadata("design:paramtypes", [Object])
    ], TapVariableTextComponent.prototype, "minLength", null);
    __decorate([
        AppGenField({
            schema: {
                type: 'integer',
                minimum: 0,
                description: 'Maximum input length'
            }
        }),
        __metadata("design:type", Object),
        __metadata("design:paramtypes", [Object])
    ], TapVariableTextComponent.prototype, "maxLength", null);
    __decorate([
        AppGenField({
            schema: {
                type: 'string',
                description: 'Placeholder: text displayed when input is empty'
            }
        }),
        __metadata("design:type", Object),
        __metadata("design:paramtypes", [Object])
    ], TapVariableTextComponent.prototype, "placeholder", null);
    TapVariableTextComponent = __decorate([
        AppGenComponent({
            constraints: {
                isArray: 'NO'
            }
        })
    ], TapVariableTextComponent);
    return TapVariableTextComponent;
}(MonitoringVariableValueComponent));
export { TapVariableTextComponent };
if (false) {
    /** @type {?} */
    TapVariableTextComponent.prototype.inputOptions;
}
//# sourceMappingURL=data:application/json;base64, 