import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../wayfinder'
/**
* @see \App\Http\Controllers\PaymentCallbackController::handleCallback
 * @see app/Http/Controllers/PaymentCallbackController.php:22
 * @route '/payment/callback'
 */
export const handleCallback = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: handleCallback.url(options),
    method: 'post',
})

handleCallback.definition = {
    methods: ["post"],
    url: '/payment/callback',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\PaymentCallbackController::handleCallback
 * @see app/Http/Controllers/PaymentCallbackController.php:22
 * @route '/payment/callback'
 */
handleCallback.url = (options?: RouteQueryOptions) => {
    return handleCallback.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\PaymentCallbackController::handleCallback
 * @see app/Http/Controllers/PaymentCallbackController.php:22
 * @route '/payment/callback'
 */
handleCallback.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: handleCallback.url(options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\PaymentCallbackController::handleCallback
 * @see app/Http/Controllers/PaymentCallbackController.php:22
 * @route '/payment/callback'
 */
    const handleCallbackForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: handleCallback.url(options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\PaymentCallbackController::handleCallback
 * @see app/Http/Controllers/PaymentCallbackController.php:22
 * @route '/payment/callback'
 */
        handleCallbackForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: handleCallback.url(options),
            method: 'post',
        })
    
    handleCallback.form = handleCallbackForm
const PaymentCallbackController = { handleCallback }

export default PaymentCallbackController