import type { _PKContact } from "./PKContact.js";
import type { _PKPayment } from "./PKPayment.js";
import type { _PKPaymentAuthorizationController } from "./PKPaymentAuthorizationController.js";
import type { _PKPaymentAuthorizationResult } from "./PKPaymentAuthorizationResult.js";
import type { _PKPaymentMethod } from "./PKPaymentMethod.js";
import type { _PKPaymentRequestCouponCodeUpdate } from "./PKPaymentRequestCouponCodeUpdate.js";
import type { _PKPaymentRequestMerchantSessionUpdate } from "./PKPaymentRequestMerchantSessionUpdate.js";
import type { _PKPaymentRequestPaymentMethodUpdate } from "./PKPaymentRequestPaymentMethodUpdate.js";
import type { _PKPaymentRequestShippingContactUpdate } from "./PKPaymentRequestShippingContactUpdate.js";
import type { _PKPaymentRequestShippingMethodUpdate } from "./PKPaymentRequestShippingMethodUpdate.js";
import type { _PKShippingMethod } from "./PKShippingMethod.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSWindow } from "../AppKit/NSWindow.js";
import type { PKPaymentAuthorizationStatus } from "./PKPaymentAuthorizationStatus.js";
export interface _PKPaymentAuthorizationControllerDelegate {
    /**
     * Sent to the delegate when payment authorization is finished. This may occur when the user cancels the request, or after the PKPaymentAuthorizationStatus parameter of the paymentAuthorizationController:didAuthorizePayment:completion: has been shown to the user. The delegate is responsible for dismissing and releasing the controller in this method.
     */
    paymentAuthorizationControllerDidFinish$?(controller: _PKPaymentAuthorizationController): void;
    /**
     * Sent to the delegate after the user has acted on the payment request. The application should inspect the payment to determine whether the payment request was authorized. If the application requested a shipping contact then the full contact is now part of the payment. The delegate must call completion with an appropriate authorization status, as may be determined by submitting the payment credential to a processing gateway for payment authorization.
     */
    paymentAuthorizationController$didAuthorizePayment$handler$?(controller: _PKPaymentAuthorizationController, payment: _PKPayment, completion: (result: _PKPaymentAuthorizationResult) => void): void;
    /**
     * @deprecated Use paymentAuthorizationController:didAuthorizePayment:handler: instead to provide more granular errors
     */
    paymentAuthorizationController$didAuthorizePayment$completion$?(controller: _PKPaymentAuthorizationController, payment: _PKPayment, completion: (status: PKPaymentAuthorizationStatus) => void): void;
    /**
     * Sent to the delegate before the payment is authorized, but after the user has authenticated using the side button. Optional.
     */
    paymentAuthorizationControllerWillAuthorizePayment$?(controller: _PKPaymentAuthorizationController): void;
    paymentAuthorizationController$didRequestMerchantSessionUpdate$?(controller: _PKPaymentAuthorizationController, handler: (update: _PKPaymentRequestMerchantSessionUpdate) => void): void;
    paymentAuthorizationController$didChangeCouponCode$handler$?(controller: _PKPaymentAuthorizationController, couponCode: _NSString, completion: (update: _PKPaymentRequestCouponCodeUpdate) => void): void;
    /**
     * Sent when the user has selected a new shipping method. The delegate should determine shipping costs based on the shipping method and either the shipping address contact in the original PKPaymentRequest or the contact provided by the last call to paymentAuthorizationController: didSelectShippingContact:completion:. The delegate must invoke the completion block with an updated array of PKPaymentSummaryItem objects. The delegate will receive no further callbacks except paymentAuthorizationControllerDidFinish: until it has invoked the completion block.
     */
    paymentAuthorizationController$didSelectShippingMethod$handler$?(controller: _PKPaymentAuthorizationController, shippingMethod: _PKShippingMethod, completion: (requestUpdate: _PKPaymentRequestShippingMethodUpdate) => void): void;
    paymentAuthorizationController$didSelectShippingContact$handler$?(controller: _PKPaymentAuthorizationController, contact: _PKContact, completion: (requestUpdate: _PKPaymentRequestShippingContactUpdate) => void): void;
    /**
     * Sent when the user has selected a new payment card. Use this delegate callback if you need to update the summary items in response to the card type changing (for example, applying credit card surcharges) The delegate will receive no further callbacks except paymentAuthorizationControllerDidFinish: until it has invoked the completion block.
     */
    paymentAuthorizationController$didSelectPaymentMethod$handler$?(controller: _PKPaymentAuthorizationController, paymentMethod: _PKPaymentMethod, completion: (requestUpdate: _PKPaymentRequestPaymentMethodUpdate) => void): void;
    /**
     * These delegate methods are deprecated and have been replaced with new callbacks that allow more granular and comprehensive errors to be surfaced to users
     * @deprecated Use paymentAuthorizationController:didSelectShippingMethod:handler: instead to provide more granular errors
     */
    paymentAuthorizationController$didSelectShippingMethod$completion$?(controller: _PKPaymentAuthorizationController, shippingMethod: _PKShippingMethod, completion: (status: PKPaymentAuthorizationStatus, summaryItems: _NSArray) => void): void;
    /**
     * @deprecated Use paymentAuthorizationController:didSelectShippingContact:handler: instead to provide more granular errors
     */
    paymentAuthorizationController$didSelectShippingContact$completion$?(controller: _PKPaymentAuthorizationController, contact: _PKContact, completion: (status: PKPaymentAuthorizationStatus, shippingMethods: _NSArray, summaryItems: _NSArray) => void): void;
    /**
     * @deprecated Use paymentAuthorizationController:didSelectPaymentMethod:handler: instead to provide more granular errors
     */
    paymentAuthorizationController$didSelectPaymentMethod$completion$?(controller: _PKPaymentAuthorizationController, paymentMethod: _PKPaymentMethod, completion: (summaryItems: _NSArray) => void): void;
    presentationWindowForPaymentAuthorizationController$?(controller: _PKPaymentAuthorizationController): _NSWindow | null;
}
