import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'app-dynamic-textarea',
  templateUrl: './dynamic-textarea.component.html',
  styleUrls: ['./dynamic-textarea.component.css']
})
export class DynamicTextareaComponent {

  @Output() dataValue: EventEmitter<string | Array<any> | boolean> = new EventEmitter();

  @Input() tag:string;
  @Input() label:string;
  @Input() type:string;
  @Input() placeholder:string;
  @Input() value:string | Array<any> | boolean | Date;
  @Input() id:string;
  @Input() name:string;
  @Input() required_reg: boolean;
  @Input() required_mod: boolean;
  @Input() readonly_reg: boolean;
  @Input() readonly_mod: boolean;
  @Input() disabled_reg: boolean;
  @Input() disabled_mod: boolean;
  @Input() max:string;
  @Input() height:string;
  @Input() icon:string;
  @Input() typeForm:string;

  constructor() {
    this.tag = '';
    this.label = '';
    this.type = '';
    this.placeholder = '';
    this.value = '';
    this.id = '';
    this.name = '';
    this.required_reg = false;
    this.required_mod = false;
    this.readonly_reg = false;
    this.readonly_mod = false;
    this.disabled_reg = false;
    this.disabled_mod = false;
    this.max = '';
    this.height = '';
    this.icon = '';
    this.typeForm = '';
  }

}
