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

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

/**
* @see \App\Http\Controllers\InstallerController::show
* @see app/Http/Controllers/InstallerController.php:14
* @route '/install'
*/
show.url = (options?: RouteQueryOptions) => {
    return show.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\InstallerController::show
* @see app/Http/Controllers/InstallerController.php:14
* @route '/install'
*/
show.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\InstallerController::show
* @see app/Http/Controllers/InstallerController.php:14
* @route '/install'
*/
show.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\InstallerController::show
* @see app/Http/Controllers/InstallerController.php:14
* @route '/install'
*/
const showForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\InstallerController::show
* @see app/Http/Controllers/InstallerController.php:14
* @route '/install'
*/
showForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\InstallerController::show
* @see app/Http/Controllers/InstallerController.php:14
* @route '/install'
*/
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\InstallerController::perform
* @see app/Http/Controllers/InstallerController.php:19
* @route '/install'
*/
export const perform = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: perform.url(options),
    method: 'post',
})

perform.definition = {
    methods: ["post"],
    url: '/install',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\InstallerController::perform
* @see app/Http/Controllers/InstallerController.php:19
* @route '/install'
*/
perform.url = (options?: RouteQueryOptions) => {
    return perform.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\InstallerController::perform
* @see app/Http/Controllers/InstallerController.php:19
* @route '/install'
*/
perform.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: perform.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\InstallerController::perform
* @see app/Http/Controllers/InstallerController.php:19
* @route '/install'
*/
const performForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: perform.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\InstallerController::perform
* @see app/Http/Controllers/InstallerController.php:19
* @route '/install'
*/
performForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: perform.url(options),
    method: 'post',
})

perform.form = performForm

const install = {
    show: Object.assign(show, show),
    perform: Object.assign(perform, perform),
}

export default install