import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../../../../wayfinder'
/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
const AdminKycDocumentDownloadController = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: AdminKycDocumentDownloadController.url(args, options),
    method: 'get',
})

AdminKycDocumentDownloadController.definition = {
    methods: ["get","head"],
    url: '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
AdminKycDocumentDownloadController.url = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions) => {
    if (Array.isArray(args)) {
        args = {
            user: args[0],
            document: args[1],
        }
    }

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
AdminKycDocumentDownloadController.get = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: AdminKycDocumentDownloadController.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
AdminKycDocumentDownloadController.head = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: AdminKycDocumentDownloadController.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
const AdminKycDocumentDownloadControllerForm = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: AdminKycDocumentDownloadController.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
AdminKycDocumentDownloadControllerForm.get = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: AdminKycDocumentDownloadController.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminKycDocumentDownloadController::__invoke
* @see app/Http/Controllers/Admin/AdminKycDocumentDownloadController.php:18
* @route '/admin/verificacion-kyc/usuarios/{user}/archivos/{document}'
*/
AdminKycDocumentDownloadControllerForm.head = (args: { user: number | { id: number }, document: string | number } | [user: number | { id: number }, document: string | number ], options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: AdminKycDocumentDownloadController.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

AdminKycDocumentDownloadController.form = AdminKycDocumentDownloadControllerForm

export default AdminKycDocumentDownloadController