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

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

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      'school_id': [null, Validators.compose([Validators.required])],
      'panel_name': [null, Validators.compose([Validators.required])],
      'default_panel_status': [null, Validators.compose([Validators.required])]
    });
   }

  ngOnInit(): void {
  }

  initDefautEntity(): void {
    if(!this.currentEntity.default_panel_status) {
      this.currentEntity.default_panel_status = 'InActive';
    }
  }

}
