import {Component, OnChanges, OnInit} from '@angular/core';
import {LenderIncomeAbstractDirective} from '../../abstract/lender-income-abstract.directive';
import {PayInResimacPdfModel} from '../../models/pay-in-resimac-pdf.model';

@Component({
  selector: 'app-lender-resimac-pdf-income',
  templateUrl: './lender-resimac-pdf-income.component.html',
  styleUrls: ['./lender-resimac-pdf-income.component.scss']
})
export class LenderResimacPdfIncomeComponent extends LenderIncomeAbstractDirective implements OnInit, OnChanges {

  constructor() { super('Resimac'); }

  ngOnInit(): void {
    this.analysis.ResimacPdf.forEach(v => {
      v.matchedPayIn = this.matchPayIn(v);
      this.data.push(new PayInResimacPdfModel(v));
    });
  }

  ngOnChanges(changes): void {
    super.OnChanges(changes);
  }

}
