import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import { LoginService } from '../../../services/login.service';
import { SchoolService } from '../../../services/school.service';
import { UrlService } from '../../../services/url.service';

import { SchoolData } from '../../../structures/school-data';

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

@Component({
  selector: 'app-school-profile-page',
  templateUrl: './school-profile-page.component.html',
  styleUrls: ['./school-profile-page.component.scss']
})
export class SchoolProfilePageComponent implements OnInit {

  schoolData: SchoolData | null = null;

  previousUrl: string | undefined = undefined;

  editSchoolLink = Globals.pages.editSchoolProfile.path;

  constructor(private loginService: LoginService, private route: ActivatedRoute, private urlService: UrlService, private schoolService: SchoolService) { 
    this.loginService.getLoggedSchool().then(
      (data) => this.schoolData = data
    );
  }

  ngOnInit(): void {
  }

}
