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

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

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

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

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

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

sync.form = syncForm

/**
* @see \App\Http\Controllers\Wp\PostDeltaController::__invoke
* @see app/Http/Controllers/Wp/PostDeltaController.php:36
* @route '/api/v1/wp/posts/changed'
*/
export const changed = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: changed.url(options),
    method: 'post',
})

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

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

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

/**
* @see \App\Http\Controllers\Wp\PostDeltaController::__invoke
* @see app/Http/Controllers/Wp/PostDeltaController.php:36
* @route '/api/v1/wp/posts/changed'
*/
const changedForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: changed.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Wp\PostDeltaController::__invoke
* @see app/Http/Controllers/Wp/PostDeltaController.php:36
* @route '/api/v1/wp/posts/changed'
*/
changedForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: changed.url(options),
    method: 'post',
})

changed.form = changedForm

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

export default posts