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

@Component({
    selector: 'app-register-service',
    templateUrl: './register-service.component.html',
    styleUrl: './register-service.component.css',
    standalone: false
})
export class RegisterServiceComponent implements OnInit {
  url: string;
  description: string;

  constructor(
    @Inject(MAT_DIALOG_DATA) public data: any,
  ) {
    this.url = "";
    this.description = "";
  }

  ngOnInit(): void {
    if(this.data.type == 'edit'){
      this.url = this.data.url;
      this.description = this.data.desc;
    }
  }
}
