import { EventEmitter, OnInit } from '@angular/core'; import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; import { AlertService, FormValidatorService } from 'ngx-techlify-core'; import { PaymentService } from '../payment.service'; import { InvoiceService } from '../../invoice/invoice.service'; import { SelectionModel } from '@angular/cdk/collections'; import { PaymentMethodTypeEnum } from "../payment-method-type.enum"; import * as i0 from "@angular/core"; export declare class PaymentFormComponent implements OnInit { private paymentService; private fb; private formValidatorService; private alertService; private invoiceService; payment: any; saved: EventEmitter; cancelled: EventEmitter; form: FormGroup; isLoadingInvoices: boolean; totalPayment: number; selection: SelectionModel; isSaving: boolean; constructor(paymentService: PaymentService, fb: FormBuilder, formValidatorService: FormValidatorService, alertService: AlertService, invoiceService: InvoiceService); /** * Get the invoices */ get invoices(): FormArray; ngOnInit(): void; /** * Save the payment. */ save(): void; /** * Method to evaluate form fields */ isFieldValid(field: string): any; /** * Method to find error in form fields */ getErrorMessage(field: string): any; /** * Load invoices for the customer. * * @param customerId * @private */ private loadInvoicesForCustomer; /** * Add invoice to payment form. * * @param invoice * @private */ private addInvoice; /** * Update total payment. * * @private */ private updateTotalPayment; /** Whether the number of selected elements matches the total number of rows. */ isAllSelected(): boolean; /** Selects all rows if they are not all selected; otherwise clear selection. */ toggleAllRows(): void; /** * Reset the invoice selection. * * @private */ private clearInvoiceSelection; /** * Update the form with payment data. * * @private */ private updateFormWithPayment; /** * Update the invoices list from payment data. * * @private */ private updateTheInvoicesWithPayment; protected readonly PaymentMethodTypeEnum: typeof PaymentMethodTypeEnum; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }