import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { BaseService } from '../../base/base-service';

@Injectable({
  providedIn: 'root'
})
export class QuestionCategoryService extends BaseService {

  constructor(
    public http: HttpClient
  ) {
    super('v1/question/question_category',http)
    super.fullUrl = `${environment.storeApi}/api/question/question_category`
   }

  getSubject(id){
    return this.http.get(`${this.fullUrl}_detail?subject_uid=${id}`)
  }

  getAllSubject(id){
    return this.http.get(`${this.fullUrl}_detail2?subject_uid=${id}`)
  }

  getSubjectWithInstructor(id){
    return this.http.get(`${this.fullUrl}_detail3?subject_uid=${id}`)
  }

  getCategoryType(subject,category){
    return this.http.get(`${this.fullUrl}_detail2_one_cat?subject_uid=${subject}&question_category_master_uid=${category}`)
  }

}

