import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../wayfinder'
/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
export const show = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(options),
    method: 'get',
})

show.definition = {
    methods: ["get","head"],
    url: '/list-view-preferences',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
show.url = (options?: RouteQueryOptions) => {
    return show.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
show.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
show.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
const showForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
showForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\UserListPreferenceController::show
* @see app/Http/Controllers/UserListPreferenceController.php:11
* @route '/list-view-preferences'
*/
showForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

show.form = showForm

/**
* @see \App\Http\Controllers\UserListPreferenceController::update
* @see app/Http/Controllers/UserListPreferenceController.php:31
* @route '/list-view-preferences'
*/
export const update = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: update.url(options),
    method: 'post',
})

update.definition = {
    methods: ["post"],
    url: '/list-view-preferences',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\UserListPreferenceController::update
* @see app/Http/Controllers/UserListPreferenceController.php:31
* @route '/list-view-preferences'
*/
update.url = (options?: RouteQueryOptions) => {
    return update.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\UserListPreferenceController::update
* @see app/Http/Controllers/UserListPreferenceController.php:31
* @route '/list-view-preferences'
*/
update.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: update.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\UserListPreferenceController::update
* @see app/Http/Controllers/UserListPreferenceController.php:31
* @route '/list-view-preferences'
*/
const updateForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: update.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\UserListPreferenceController::update
* @see app/Http/Controllers/UserListPreferenceController.php:31
* @route '/list-view-preferences'
*/
updateForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: update.url(options),
    method: 'post',
})

update.form = updateForm

const UserListPreferenceController = { show, update }

export default UserListPreferenceController