import { Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { PaymentDateComponent } from '../payment-date/payment-date.component';

@Component({
  selector: 'app-payment-rate',
  templateUrl: './payment-rate.component.html',
  styleUrls: ['./payment-rate.component.scss'],
})
export class PaymentRateComponent {
  constructor(public readonly dialog: MatDialog) {}

  onOpenDate(): void {
    let dialogRef;
    dialogRef = this.dialog.open(PaymentDateComponent, {
      width: '70%',
    });

    dialogRef.afterClosed().subscribe((result) => {
      console.log(`Dialog result: ${result}`);
    });
  }
}
