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

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      room_code: [null, Validators.compose([Validators.required])],
      room_name: [null, Validators.compose([Validators.required])],
      room_addr: [null, Validators.compose([Validators.required])],
      room_capacity: [30, Validators.compose([Validators.required])],
      // layout_num: [0, Validators.compose([Validators.required])],
      mix_max: [2, Validators.compose([Validators.required])],
    });
   }

  ngOnInit(): void {
  }

  initDefautEntity() {
    super.initDefautEntity();

    this.currentEntity.school_id=this[`school_id`];
    this.currentEntity.batch_id=this[`batch_id`];
  }

}
