import { Component, OnInit } from '@angular/core';
import { ServicesService } from 'src/app/services.service';

@Component({
  selector: 'app-faqquestion',
  templateUrl: './faqquestion.component.html',
  styleUrls: ['./faqquestion.component.scss'],
})
export class FaqquestionComponent implements OnInit {
  expandContain = [];
  panelOpenState = false;
  constructor(public service: ServicesService) {
    this.service.headershow = true;
    this.service.SearchValue = true;
    this.service.title = '';
    var access = window.localStorage.getItem('accessitem');
    if (access) {
      var set = JSON.parse(<string>access);
      if (set) {
        this.service.access.CATaccess = set.CAT_access ? true : false;
        this.service.access.Knowaccess = set.KA_access ? true : false;
        this.service.access.Practiceaccess = set.PT_access ? true : false;
        this.service.access.livechat_access = set.livechat_access ? true : false;
      }
    }
    this.service.headerset = {
      dashboard: false,
      studyguuide: false,
      knowledge: false,
      knowques: false,
      knowresult: false,
      practice: false,
      cat: false,
      datestring: false,
      CATresult: false,
      CATQue: false,
      PracticeResult: false,
      Practiceques: false,
      studentprofile: false,
      resource: false,
      liveSupport: false
    };
  }
  ngOnInit(): void { }
  expandTab(i) {
    this.expandContain[i] = !this.expandContain[i];
  }
}
