import { Component, input, OnInit } from '@angular/core';
import { environment } from '@env/environment';
import { RouterLink } from '@angular/router';
import { ProjectFacade } from '@app/adapters/projects/project.facade';

@Component({
  selector: 'app-my-profile-project-item',
  standalone: true,
  imports: [RouterLink],
  templateUrl: './my-profile-project-item.component.html',
  styleUrl: './my-profile-project-item.component.scss',
})
export class MyProfileProjectItemComponent implements OnInit {
  protected readonly environment = environment;
  projectId = input.required<string>();

  private readonly projectFacade = new ProjectFacade();
  protected project = this.projectFacade.project;

  ngOnInit(): void {
    this.projectFacade.loadOne(this.projectId());
  }
}
