import { Component, OnInit, ChangeDetectionStrategy, Inject } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
    selector: 'app-template-dialog',
    templateUrl: './template-dialog.component.html',
    styleUrls: ['./template-dialog.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class TemplateDialogComponent implements OnInit {

    constructor(
        public dialog: MatDialog,
        public dialogRef: MatDialogRef<TemplateDialogComponent>,
        @Inject(MAT_DIALOG_DATA) public data: any,
    ) { }

    ngOnInit(): void {

    }

    word(){

    }

    excel(){
            let link = document.createElement("a")
            link.download = "ru_student_template"
            link.href = "assets/templates/student_import.xlsx"
            link.click()
    }

    paid_excel(){
        let link = document.createElement("a")
        link.download = "ru_student_template_paid"
        link.href = "assets/templates/ru_student_template_paid.xlsx"
        link.click()
    }

    wait_excel(){
        let link = document.createElement("a")
        link.download = "ru_student_template_wait"
        link.href = "assets/templates/ru_student_template_wait.xlsx"
        link.click()
    }

}
