import { Component, OnInit, Input } from '@angular/core';
import {MatDialog} from '@angular/material/dialog';

import { CourseData } from '../../../structures/course-data';
import { CourseInstructorData } from '../../../structures/course-instructor-data';

import { CourseInstructorsDialogComponent } from '../../../courses/components/course-instructors-dialog/course-instructors-dialog.component';

import { CourseService } from '../../../services/course.service';

import * as Globals from '../../../globals';

@Component({
  selector: 'app-questionnaire-info-block',
  templateUrl: './questionnaire-info-block.component.html',
  styleUrls: ['./questionnaire-info-block.component.scss']
})
export class QuestionnaireInfoBlockComponent implements OnInit {

  @Input() courseData: CourseData | null = null;

  showQuestionnaire: boolean = false;

  constructor() { }

  ngOnInit(): void {
  }

  wordShape(count: number, word: string) {
    return Globals.wordShape(count, word);
  }
  //   var result = '';
  //   if(count == 0) {
  //     switch (word) {
  //       case 'muz': return 'mužů'; break;
  //       case 'zena': return 'žen'; break;
  //       case 'kluk': return 'kluků'; break;
  //       case 'holka': return 'holek'; break;
  //       default: return ''; break;
  //     }
  //   } else if (count == 1) {
  //     switch (word) {
  //       case 'muz': return 'muž'; break;
  //       case 'zena': return 'žena'; break;
  //       case 'kluk': return 'kluk'; break;
  //       case 'holka': return 'holka'; break;
  //       default: return ''; break;
  //     }
  //   } else if (count < 5) {
  //     switch (word) {
  //       case 'muz': return 'muži'; break;
  //       case 'zena': return 'ženy'; break;
  //       case 'kluk': return 'kluci'; break;
  //       case 'holka': return 'holky'; break;
  //       default: return ''; break;
  //     }
  //   } else {
  //     switch (word) {
  //       case 'muz': return 'mužů'; break;
  //       case 'zena': return 'žen'; break;
  //       case 'kluk': return 'kluků'; break;
  //       case 'holka': return 'holek'; break;
  //       default: return ''; break;
  //     }     
  //   }
  //   return result;
  // }
}
