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

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

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

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

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

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

approve.form = approveForm

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

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

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

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

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

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

discardEmail.form = discardEmailForm

/**
* @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 forexImport = {
    index: Object.assign(index, index),
    approve: Object.assign(approve, approve),
    discardEmail: Object.assign(discardEmail, discardEmail),
    update: Object.assign(update, update),
    destroy: Object.assign(destroy, destroy),
    discard: Object.assign(discard, discard),
}

export default forexImport