import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../wayfinder'
import bookings from './bookings'
import vehicles from './vehicles'
import profile from './profile'
import password from './password'
import defaultLocation from './default-location'
/**
* @see \App\Http\Controllers\Customer\CustomerPortalController::show
* @see app/Http/Controllers/Customer/CustomerPortalController.php:36
* @route '/portal'
*/
export const show = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(options),
    method: 'get',
})

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

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

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

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

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

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

/**
* @see \App\Http\Controllers\Customer\CustomerPortalController::show
* @see app/Http/Controllers/Customer/CustomerPortalController.php:36
* @route '/portal'
*/
showForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

show.form = showForm

const portal = {
    show: Object.assign(show, show),
    bookings: Object.assign(bookings, bookings),
    vehicles: Object.assign(vehicles, vehicles),
    profile: Object.assign(profile, profile),
    password: Object.assign(password, password),
    defaultLocation: Object.assign(defaultLocation, defaultLocation),
}

export default portal