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';
import { AjaxService } from '../../../../core/service/ajax.service';
import { FuncService } from '../../../../core/service/func.service';
import { MsgService } from '../../../../core/service/msg.service';


@Component({
  selector: 'app-cf-authtag-detail',
  templateUrl: './authtag-detail.component.html',
  styleUrls: ['./authtag-detail.component.scss']
})
export class CfAuthTagDetailComponent extends FrameDetailComponent implements OnInit {
  schoolArray = [];
  tag_color : any;

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      'tag_name': [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(64)])],
      'tag_color': [null,Validators.compose([Validators.required])],
      'tag_desc': [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(255)])]
    });

  }

  ngOnInit() {

  }

  colorChange(e) {
    this.currentEntity.tag_color = e;
  }

  initDefautEntity() {
    if (this.detailMode === 'add') {

    } else {

    }
  }


}
