import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../../../../wayfinder'
/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::index
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:24
* @route '/admin/importacion-forex'
*/
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::index
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:24
* @route '/admin/importacion-forex'
*/
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

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

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

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

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

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::index
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:24
* @route '/admin/importacion-forex'
*/
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\ForexImportStagingController::approveUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:143
* @route '/admin/importacion-forex/aprobar'
*/
export const approveUser = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: approveUser.url(options),
    method: 'post',
})

approveUser.definition = {
    methods: ["post"],
    url: '/admin/importacion-forex/aprobar',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::approveUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:143
* @route '/admin/importacion-forex/aprobar'
*/
approveUser.url = (options?: RouteQueryOptions) => {
    return approveUser.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::approveUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:143
* @route '/admin/importacion-forex/aprobar'
*/
approveUser.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: approveUser.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::approveUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:143
* @route '/admin/importacion-forex/aprobar'
*/
const approveUserForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: approveUser.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::approveUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:143
* @route '/admin/importacion-forex/aprobar'
*/
approveUserForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: approveUser.url(options),
    method: 'post',
})

approveUser.form = approveUserForm

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discardUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:286
* @route '/admin/importacion-forex/descartar-correo'
*/
export const discardUser = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: discardUser.url(options),
    method: 'post',
})

discardUser.definition = {
    methods: ["post"],
    url: '/admin/importacion-forex/descartar-correo',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discardUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:286
* @route '/admin/importacion-forex/descartar-correo'
*/
discardUser.url = (options?: RouteQueryOptions) => {
    return discardUser.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discardUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:286
* @route '/admin/importacion-forex/descartar-correo'
*/
discardUser.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: discardUser.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discardUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:286
* @route '/admin/importacion-forex/descartar-correo'
*/
const discardUserForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: discardUser.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discardUser
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:286
* @route '/admin/importacion-forex/descartar-correo'
*/
discardUserForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: discardUser.url(options),
    method: 'post',
})

discardUser.form = discardUserForm

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::update
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:172
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
export const update = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: update.url(args, options),
    method: 'patch',
})

update.definition = {
    methods: ["patch"],
    url: '/admin/importacion-forex/item/{forexImportStagingItem}',
} satisfies RouteDefinition<["patch"]>

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::update
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:172
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
update.url = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { forexImportStagingItem: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { forexImportStagingItem: args.id }
    }

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::update
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:172
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
update.patch = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: update.url(args, options),
    method: 'patch',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::update
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:172
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
const updateForm = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: update.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PATCH',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::update
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:172
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
updateForm.patch = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: update.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PATCH',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

update.form = updateForm

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::destroy
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:265
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
export const destroy = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

destroy.definition = {
    methods: ["delete"],
    url: '/admin/importacion-forex/item/{forexImportStagingItem}',
} satisfies RouteDefinition<["delete"]>

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::destroy
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:265
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
destroy.url = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { forexImportStagingItem: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { forexImportStagingItem: args.id }
    }

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::destroy
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:265
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
destroy.delete = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::destroy
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:265
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
const destroyForm = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: destroy.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'DELETE',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::destroy
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:265
* @route '/admin/importacion-forex/item/{forexImportStagingItem}'
*/
destroyForm.delete = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: destroy.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'DELETE',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

destroy.form = destroyForm

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discard
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:309
* @route '/admin/importacion-forex/{forexImportStagingItem}/descartar'
*/
export const discard = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: discard.url(args, options),
    method: 'patch',
})

discard.definition = {
    methods: ["patch"],
    url: '/admin/importacion-forex/{forexImportStagingItem}/descartar',
} satisfies RouteDefinition<["patch"]>

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discard
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:309
* @route '/admin/importacion-forex/{forexImportStagingItem}/descartar'
*/
discard.url = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { forexImportStagingItem: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { forexImportStagingItem: args.id }
    }

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discard
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:309
* @route '/admin/importacion-forex/{forexImportStagingItem}/descartar'
*/
discard.patch = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: discard.url(args, options),
    method: 'patch',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discard
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:309
* @route '/admin/importacion-forex/{forexImportStagingItem}/descartar'
*/
const discardForm = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: discard.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PATCH',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\ForexImportStagingController::discard
* @see app/Http/Controllers/Admin/ForexImportStagingController.php:309
* @route '/admin/importacion-forex/{forexImportStagingItem}/descartar'
*/
discardForm.patch = (args: { forexImportStagingItem: number | { id: number } } | [forexImportStagingItem: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: discard.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PATCH',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

discard.form = discardForm

const ForexImportStagingController = { index, approveUser, discardUser, update, destroy, discard }

export default ForexImportStagingController