import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../wayfinder'
/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

index.definition = {
    methods: ["get","head"],
    url: '/mis-inversiones',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\MyInvestmentsController::index
* @see app/Http/Controllers/MyInvestmentsController.php:15
* @route '/mis-inversiones'
*/
indexForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

index.form = indexForm

const MyInvestmentsController = { index }

export default MyInvestmentsController