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

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      'menu_text': [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(32)])],
      'menu_param': [null],
      'menu_type': [null, Validators.required],
      'menu_status': [null, Validators.required]
    });
  }

  ngOnInit() {
  }

}
