import { MatTableDataSource } from '@angular/material/table'; import { TableColumn } from '../paginated-table/table.model'; import { StatusBadgeColor } from '../status-badge/status-badge.component'; import * as i0 from "@angular/core"; export interface RefundHistory { refund_amount: number; refund_currency: string; refund_date: string; refund_id: number; refund_status: string; } export declare const refundStatusColor: Partial>; /** * Optional configuration that turns the refund ID column into a link. Each * project points it at its own route; omit it and the ID stays plain text. */ export interface RefundsInfoRoute { /** * Absolute router path, shared by every row — e.g. * `'/payments/refunds-reports/detail'`. * * A blank or whitespace-only link means "no link", matching * `DisputesInfoComponent`. Do not append a query string here: `?` would be * percent-encoded into the path. Use {@link queryParamPaths} instead. */ link: string; /** * How each row's query string is built. Keys are query-string keys; **values * are `RefundHistory` field names, not literal values** — each is read off * the refund being rendered. This is the paginated table's column contract, * and the inverse of `DisputeInfoRoute.queryParams` (whose values are * literals), hence the distinct name. * * Omitted uses {@link defaultRefundIdQueryParamPaths}; `{}` links without a * query string. * * @example { id: 'refund_id' } // ?id=152 * @example { refundId: 'refund_id', st: 'refund_status' } // ?refundId=152&st=COMPLETED */ queryParamPaths?: Record; } /** Applied when {@link RefundsInfoRoute.queryParamPaths} is omitted. */ export declare const defaultRefundIdQueryParamPaths: Readonly>; export declare class RefundsInfoComponent { private readonly statusLabelPipe; private _refundHistory?; private _route?; /** * Held by reference so {@link route} can be applied by mutating this column * rather than rebuilding {@link refundsDisplayedColumns}. Keeping the array * identity stable matters: an inline `[route]="{ ... }"` literal re-runs the * setter on every change-detection pass, and a fresh array each pass would * churn the table's `ngOnChanges`. Declared before the array that uses it — * field initializers run top to bottom. */ private readonly refundIdColumn; set refundHistory(value: RefundHistory[] | undefined); get refundHistory(): RefundHistory[] | undefined; /** Turns the refund ID into a link. Omitted, the ID renders as plain text. */ set route(value: RefundsInfoRoute | undefined); get route(): RefundsInfoRoute | undefined; refundedValue?: string; isLoading: boolean; refundsDisplayedColumns: TableColumn[]; refundsInfoDataSource: MatTableDataSource; private syncRefundHistoryData; /** * Mirrors {@link route} onto the ID column. The query param mapping is copied * so neither the caller's object nor the shared default can be reached * through the column afterwards. */ private syncRefundIdRoute; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isLoading: unknown; }