import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../wayfinder'
import sections from './sections'
import manualBalance from './manual-balance'
/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::index
* @see app/Http/Controllers/Admin/AdminDebugController.php:19
* @route '/admin/debug'
*/
indexForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

index.form = indexForm

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::consolidateBalance
* @see app/Http/Controllers/Admin/AdminDebugController.php:130
* @route '/admin/debug/consolidacion-balance'
*/
export const consolidateBalance = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: consolidateBalance.url(options),
    method: 'post',
})

consolidateBalance.definition = {
    methods: ["post"],
    url: '/admin/debug/consolidacion-balance',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::consolidateBalance
* @see app/Http/Controllers/Admin/AdminDebugController.php:130
* @route '/admin/debug/consolidacion-balance'
*/
consolidateBalance.url = (options?: RouteQueryOptions) => {
    return consolidateBalance.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::consolidateBalance
* @see app/Http/Controllers/Admin/AdminDebugController.php:130
* @route '/admin/debug/consolidacion-balance'
*/
consolidateBalance.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: consolidateBalance.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::consolidateBalance
* @see app/Http/Controllers/Admin/AdminDebugController.php:130
* @route '/admin/debug/consolidacion-balance'
*/
const consolidateBalanceForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: consolidateBalance.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\AdminDebugController::consolidateBalance
* @see app/Http/Controllers/Admin/AdminDebugController.php:130
* @route '/admin/debug/consolidacion-balance'
*/
consolidateBalanceForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: consolidateBalance.url(options),
    method: 'post',
})

consolidateBalance.form = consolidateBalanceForm

const debug = {
    index: Object.assign(index, index),
    sections: Object.assign(sections, sections),
    consolidateBalance: Object.assign(consolidateBalance, consolidateBalance),
    manualBalance: Object.assign(manualBalance, manualBalance),
}

export default debug