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-module-detail',
  templateUrl: './frame-module-detail.component.html',
  styleUrls: ['./frame-module-detail.component.scss']
})
export class FrameModuleDetailComponent extends FrameDetailComponent implements OnInit {

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      'module_name': [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(128)])],
      'module_alias': [null, Validators.compose([Validators.required, Validators.minLength(1), Validators.maxLength(32)])],
      'module_version': [null],
      'module_class': [null],
      'project_name': [null],
      'module_status': [null],
      'load_order': [null, Validators.required],
      'module_param': [null]
    });
  }

  ngOnInit() {
  }


}

