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

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

  // agentArr = [];
  // groupArr = [];

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      'ly_group_id': [null, Validators.compose([Validators.required])],
      'show_std_name': [null, Validators.compose([Validators.required])],
      'show_std_image': [null, Validators.compose([Validators.required])],
      'separate_score': [null, Validators.compose([Validators.required])],
      'show_std_sex': [null, Validators.compose([Validators.required])]
    });
  }

  ngOnInit() {
    // AjaxService.requestArray('exam/checkin/init/agent.htm', {}, (array) => {
    //   this.agentArr = array;
    // });
  }

  // queryGroup() {
  //   let temp = [];
  //   for(const arr  of this.ResponseArray) {
  //     if(arr.ly_agent_id == this.currentEntity.ly_agent_id) {
  //       temp.push(arr);
  //     }
  //   }
  //   this.groupArr = temp;
  // }
}
