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

@Component({
  selector: 'app-register-service',
  templateUrl: './register-service.component.html',
  styleUrls: ['./register-service.component.css']
})
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;
    }
  }

}
