import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../wayfinder'
/**
* @see \App\Http\Controllers\Wp\CouponsSyncController::__invoke
* @see app/Http/Controllers/Wp/CouponsSyncController.php:32
* @route '/api/v1/wp/coupons/sync'
*/
export const sync = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: sync.url(options),
    method: 'post',
})

sync.definition = {
    methods: ["post"],
    url: '/api/v1/wp/coupons/sync',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Wp\CouponsSyncController::__invoke
* @see app/Http/Controllers/Wp/CouponsSyncController.php:32
* @route '/api/v1/wp/coupons/sync'
*/
sync.url = (options?: RouteQueryOptions) => {
    return sync.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Wp\CouponsSyncController::__invoke
* @see app/Http/Controllers/Wp/CouponsSyncController.php:32
* @route '/api/v1/wp/coupons/sync'
*/
sync.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: sync.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Wp\CouponsSyncController::__invoke
* @see app/Http/Controllers/Wp/CouponsSyncController.php:32
* @route '/api/v1/wp/coupons/sync'
*/
const syncForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: sync.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Wp\CouponsSyncController::__invoke
* @see app/Http/Controllers/Wp/CouponsSyncController.php:32
* @route '/api/v1/wp/coupons/sync'
*/
syncForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: sync.url(options),
    method: 'post',
})

sync.form = syncForm

const coupons = {
    sync: Object.assign(sync, sync),
}

export default coupons