import { Component, OnInit } from '@angular/core';
import {BsModalRef} from 'ngx-bootstrap';
import {FormBuilder, Validators} from '@angular/forms';
import {FrameEditComponent} from '../../core/FrameEditComponent';
import {DomSanitizer} from '@angular/platform-browser';

@Component({
  selector: 'app-farme-param-detail',
  templateUrl: './farme-param-detail.component.html',
  styleUrls: ['./farme-param-detail.component.scss']
})
export class FarmeParamDetailComponent  extends FrameEditComponent implements OnInit {

  constructor(bsModalRef: BsModalRef, fb: FormBuilder, san: DomSanitizer) {
    super(bsModalRef, san);
    this.valForm = fb.group({
      'param_name': [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(32)])],
      'param_value': [null],
      'param_value_type': [null, Validators.required],
      'protect_status': ['InActive', Validators.required],
      'project_owner': [null],
      'param_desc': [null]
    });
  }

  ngOnInit() {

  }
}
