import {Component, OnInit} from '@angular/core';
import {BsModalRef} from "ngx-bootstrap/modal";
import {FormBuilder, Validators} from "@angular/forms";
import {FrameDetailComponent} from "../../core/detail/frame.detail";

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

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = 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() {

  }
}
