import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../wayfinder'
/**
* @see \App\Http\Controllers\Administration\ImportController::upload
* @see app/Http/Controllers/Administration/ImportController.php:28
* @route '/administration/import/upload'
*/
export const upload = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: upload.url(options),
    method: 'post',
})

upload.definition = {
    methods: ["post"],
    url: '/administration/import/upload',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Administration\ImportController::upload
* @see app/Http/Controllers/Administration/ImportController.php:28
* @route '/administration/import/upload'
*/
upload.url = (options?: RouteQueryOptions) => {
    return upload.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Administration\ImportController::upload
* @see app/Http/Controllers/Administration/ImportController.php:28
* @route '/administration/import/upload'
*/
upload.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: upload.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Administration\ImportController::upload
* @see app/Http/Controllers/Administration/ImportController.php:28
* @route '/administration/import/upload'
*/
const uploadForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: upload.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Administration\ImportController::upload
* @see app/Http/Controllers/Administration/ImportController.php:28
* @route '/administration/import/upload'
*/
uploadForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: upload.url(options),
    method: 'post',
})

upload.form = uploadForm

/**
* @see \App\Http\Controllers\Administration\ImportController::run
* @see app/Http/Controllers/Administration/ImportController.php:92
* @route '/administration/import/run'
*/
export const run = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: run.url(options),
    method: 'post',
})

run.definition = {
    methods: ["post"],
    url: '/administration/import/run',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Administration\ImportController::run
* @see app/Http/Controllers/Administration/ImportController.php:92
* @route '/administration/import/run'
*/
run.url = (options?: RouteQueryOptions) => {
    return run.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Administration\ImportController::run
* @see app/Http/Controllers/Administration/ImportController.php:92
* @route '/administration/import/run'
*/
run.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: run.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Administration\ImportController::run
* @see app/Http/Controllers/Administration/ImportController.php:92
* @route '/administration/import/run'
*/
const runForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: run.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Administration\ImportController::run
* @see app/Http/Controllers/Administration/ImportController.php:92
* @route '/administration/import/run'
*/
runForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: run.url(options),
    method: 'post',
})

run.form = runForm

const importMethod = {
    upload: Object.assign(upload, upload),
    run: Object.assign(run, run),
}

export default importMethod