import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../wayfinder'
/**
* @see \App\Http\Controllers\Api\V1\DispatchController::create
* @see app/Http/Controllers/Api/V1/DispatchController.php:491
* @route '/dispatch/tasks'
*/
export const create = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: create.url(options),
    method: 'post',
})

create.definition = {
    methods: ["post"],
    url: '/dispatch/tasks',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Api\V1\DispatchController::create
* @see app/Http/Controllers/Api/V1/DispatchController.php:491
* @route '/dispatch/tasks'
*/
create.url = (options?: RouteQueryOptions) => {
    return create.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Api\V1\DispatchController::create
* @see app/Http/Controllers/Api/V1/DispatchController.php:491
* @route '/dispatch/tasks'
*/
create.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: create.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Api\V1\DispatchController::create
* @see app/Http/Controllers/Api/V1/DispatchController.php:491
* @route '/dispatch/tasks'
*/
const createForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: create.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Api\V1\DispatchController::create
* @see app/Http/Controllers/Api/V1/DispatchController.php:491
* @route '/dispatch/tasks'
*/
createForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: create.url(options),
    method: 'post',
})

create.form = createForm

const tasks = {
    create: Object.assign(create, create),
}

export default tasks