import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../wayfinder'
/**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

index.definition = {
    methods: ["get","head"],
    url: '/notas-nota-naval-militar',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
    const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: index.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
        indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: index.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::index
 * @see app/Http/Controllers/NotaNavalMilitarController.php:27
 * @route '/notas-nota-naval-militar'
 */
        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\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
export const nivel = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: nivel.url(args, options),
    method: 'get',
})

nivel.definition = {
    methods: ["get","head"],
    url: '/notas-nota-naval-militar/nivel/{nivel}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
nivel.url = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { nivel: args }
    }

    
    if (Array.isArray(args)) {
        args = {
                    nivel: args[0],
                }
    }

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        nivel: args.nivel,
                }

    return nivel.definition.url
            .replace('{nivel}', parsedArgs.nivel.toString())
            .replace(/\/+$/, '') + queryParams(options)
}

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
nivel.get = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: nivel.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
nivel.head = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: nivel.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
    const nivelForm = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: nivel.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
        nivelForm.get = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: nivel.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::nivel
 * @see app/Http/Controllers/NotaNavalMilitarController.php:58
 * @route '/notas-nota-naval-militar/nivel/{nivel}'
 */
        nivelForm.head = (args: { nivel: string | number } | [nivel: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: nivel.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    nivel.form = nivelForm
/**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
export const detalle = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: detalle.url(args, options),
    method: 'get',
})

detalle.definition = {
    methods: ["get","head"],
    url: '/notas-nota-naval-militar/detalle/{paralelo}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
detalle.url = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { paralelo: args }
    }

            if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
            args = { paralelo: args.id }
        }
    
    if (Array.isArray(args)) {
        args = {
                    paralelo: args[0],
                }
    }

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        paralelo: typeof args.paralelo === 'object'
                ? args.paralelo.id
                : args.paralelo,
                }

    return detalle.definition.url
            .replace('{paralelo}', parsedArgs.paralelo.toString())
            .replace(/\/+$/, '') + queryParams(options)
}

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
detalle.get = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: detalle.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
detalle.head = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: detalle.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
    const detalleForm = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: detalle.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
        detalleForm.get = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: detalle.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::detalle
 * @see app/Http/Controllers/NotaNavalMilitarController.php:101
 * @route '/notas-nota-naval-militar/detalle/{paralelo}'
 */
        detalleForm.head = (args: { paralelo: number | { id: number } } | [paralelo: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: detalle.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    detalle.form = detalleForm
/**
* @see \App\Http\Controllers\NotaNavalMilitarController::store
 * @see app/Http/Controllers/NotaNavalMilitarController.php:147
 * @route '/nota-naval-militar'
 */
export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

store.definition = {
    methods: ["post"],
    url: '/nota-naval-militar',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::store
 * @see app/Http/Controllers/NotaNavalMilitarController.php:147
 * @route '/nota-naval-militar'
 */
store.url = (options?: RouteQueryOptions) => {
    return store.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\NotaNavalMilitarController::store
 * @see app/Http/Controllers/NotaNavalMilitarController.php:147
 * @route '/nota-naval-militar'
 */
store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\NotaNavalMilitarController::store
 * @see app/Http/Controllers/NotaNavalMilitarController.php:147
 * @route '/nota-naval-militar'
 */
    const storeForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: store.url(options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\NotaNavalMilitarController::store
 * @see app/Http/Controllers/NotaNavalMilitarController.php:147
 * @route '/nota-naval-militar'
 */
        storeForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: store.url(options),
            method: 'post',
        })
    
    store.form = storeForm
const notanavmil = {
    index: Object.assign(index, index),
nivel: Object.assign(nivel, nivel),
detalle: Object.assign(detalle, detalle),
store: Object.assign(store, store),
}

export default notanavmil