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

@Component({
   selector: 'app-price',
   templateUrl: './price.component.html',
   styleUrls: ['./price.component.css']
})
export class PriceComponent {

   price: number | undefined;

   constructor(
      @Inject(MAT_DIALOG_DATA) public data: number,
      private dialogRef: MatDialogRef<PriceComponent>
   ) {}

   save() {
      this.dialogRef.close(this.price);
   }
}
