import { EventEmitter } from '../../stencil-public-runtime'; import { BatchApproveData, CreateTransactionResponse, TransactionI } from "../../api/transactions/interface"; import { BusinessRulesInterface } from "../../api/businessRules/interface"; import { Options } from '../../store/store'; import { CloseEvent } from '../paycargo-checkout/interface'; export type DisputeData = { createdTransactions: BatchApproveData[]; failedTransactions: CreateTransactionResponse[]; businessRules: BusinessRulesInterface; }; export declare class PayCargoDispute { el: HTMLPaycargoDisputeElement; private toast; private today; private _defaultFields; /** * Options * This will contain the following properties * - env * - code * - brand * - originURL * - token (consumer JWT) */ options: Options | string; /** * pcTransactions - array of transactions to dispute. * Accepts the same array shape as `paycargo-checkout`; the wrapper * keys it by numeric index (matching `paycargo-batch-cart`) before * handing it to the internal widget, and stamps a `uuid` on each tx * (only when one is not already present on the caller's payload). */ pcTransactions: TransactionI[] | string; /** * widgetStyle - pass-through to the internal dispute widget * (v1 - stencil, v2 - react, v3 - swissport) */ widgetStyle: 'v1' | 'v2' | 'v3' | string; /** * disabled - pass-through to the internal dispute widget button */ disabled?: boolean | 'false' | 'true'; /** * Function will trigger when dispute attempt has occurred */ onPcDispute: string | ((data: CloseEvent) => void); /** * Function will trigger when modal is closed */ onPcClose: string | ((data: CloseEvent) => void); _loadedTransactions: TransactionI[]; _tokenInvalid: boolean; _permissionToDispute: boolean; /** * Event that is triggered after dispute response * has been received from the internal widget. */ disputeResponseEvent: EventEmitter>; handleHostClick(event: MouseEvent): void; onDisputeResponseEvent(event: CustomEvent>): void; /** * Programmatically open/close the dispute modal. */ makeVisible(show: boolean): Promise; componentWillLoad(): Promise; componentDidLoad(): void; dataDidChangeHandler(newValue: TransactionI[] | string): Promise; render(): any; }