import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../../wayfinder'
/**
* @see \App\Http\Controllers\Widget\CouponApplyController::__invoke
* @see app/Http/Controllers/Widget/CouponApplyController.php:30
* @route '/api/v1/widget/coupon/apply'
*/
const CouponApplyController = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: CouponApplyController.url(options),
    method: 'post',
})

CouponApplyController.definition = {
    methods: ["post"],
    url: '/api/v1/widget/coupon/apply',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Widget\CouponApplyController::__invoke
* @see app/Http/Controllers/Widget/CouponApplyController.php:30
* @route '/api/v1/widget/coupon/apply'
*/
CouponApplyController.url = (options?: RouteQueryOptions) => {
    return CouponApplyController.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Widget\CouponApplyController::__invoke
* @see app/Http/Controllers/Widget/CouponApplyController.php:30
* @route '/api/v1/widget/coupon/apply'
*/
CouponApplyController.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: CouponApplyController.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Widget\CouponApplyController::__invoke
* @see app/Http/Controllers/Widget/CouponApplyController.php:30
* @route '/api/v1/widget/coupon/apply'
*/
const CouponApplyControllerForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: CouponApplyController.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Widget\CouponApplyController::__invoke
* @see app/Http/Controllers/Widget/CouponApplyController.php:30
* @route '/api/v1/widget/coupon/apply'
*/
CouponApplyControllerForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: CouponApplyController.url(options),
    method: 'post',
})

CouponApplyController.form = CouponApplyControllerForm

export default CouponApplyController