import { Input } from '../Input' import { InputType } from '../Input' export class EditText extends Input { private placeholder: string = ''; private defaultValue: string = ''; private validation: string = ''; constructor(name: string) { super(InputType.EditText, name); } setPlaceholder(placeholder: string): EditText { this.placeholder = placeholder; return this; } setDefaultValue(defaultValue: string): EditText { this.defaultValue = defaultValue; return this; } setValidation(validation: string): EditText { this.validation = validation; return this; } get Validation(): string { return this.validation; } get Placeholder(): string { return this.placeholder; } get DefaultValue(): string { return this.defaultValue; } toJSON(): any { return { type: this.Type, name: this.Name, value: this.Value, importance: this.Importance, attributes: { placeholder: this.placeholder, default_value: this.defaultValue, validation: this.validation } } } }