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


@Component({
  selector: 'app-main-project-content',
  standalone: false,
  templateUrl: './main-project-content.html',
  styleUrl: './main-project-content.css',
})
export class MainProjectContent implements OnInit {
  mode: 'add' | 'edit' | 'default' = 'default';

  constructor(
    private route: ActivatedRoute,
    private router: Router
  ) {}

  ngOnInit(): void {
    let param = this.route.snapshot.paramMap.get('mode');

    if (param === 'add') {
      this.mode = 'add';
    } else if (param === 'edit') {
      this.mode = 'edit';
    } else {
      this.mode = 'default';
    }
  }
}
