import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../../wayfinder'
/**
* @see \App\Http\Controllers\Api\WidgetChatController::start
* @see app/Http/Controllers/Api/WidgetChatController.php:20
* @route '/api/widget/chat/start'
*/
export const start = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: start.url(options),
    method: 'post',
})

start.definition = {
    methods: ["post"],
    url: '/api/widget/chat/start',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Api\WidgetChatController::start
* @see app/Http/Controllers/Api/WidgetChatController.php:20
* @route '/api/widget/chat/start'
*/
start.url = (options?: RouteQueryOptions) => {
    return start.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Api\WidgetChatController::start
* @see app/Http/Controllers/Api/WidgetChatController.php:20
* @route '/api/widget/chat/start'
*/
start.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: start.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::start
* @see app/Http/Controllers/Api/WidgetChatController.php:20
* @route '/api/widget/chat/start'
*/
const startForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: start.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::start
* @see app/Http/Controllers/Api/WidgetChatController.php:20
* @route '/api/widget/chat/start'
*/
startForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: start.url(options),
    method: 'post',
})

start.form = startForm

/**
* @see \App\Http\Controllers\Api\WidgetChatController::message
* @see app/Http/Controllers/Api/WidgetChatController.php:68
* @route '/api/widget/chat/message'
*/
export const message = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: message.url(options),
    method: 'post',
})

message.definition = {
    methods: ["post"],
    url: '/api/widget/chat/message',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Api\WidgetChatController::message
* @see app/Http/Controllers/Api/WidgetChatController.php:68
* @route '/api/widget/chat/message'
*/
message.url = (options?: RouteQueryOptions) => {
    return message.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Api\WidgetChatController::message
* @see app/Http/Controllers/Api/WidgetChatController.php:68
* @route '/api/widget/chat/message'
*/
message.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: message.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::message
* @see app/Http/Controllers/Api/WidgetChatController.php:68
* @route '/api/widget/chat/message'
*/
const messageForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: message.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::message
* @see app/Http/Controllers/Api/WidgetChatController.php:68
* @route '/api/widget/chat/message'
*/
messageForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: message.url(options),
    method: 'post',
})

message.form = messageForm

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
export const history = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: history.url(options),
    method: 'get',
})

history.definition = {
    methods: ["get","head"],
    url: '/api/widget/chat/history',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
history.url = (options?: RouteQueryOptions) => {
    return history.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
history.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: history.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
history.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: history.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
const historyForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: history.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
historyForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: history.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Api\WidgetChatController::history
* @see app/Http/Controllers/Api/WidgetChatController.php:171
* @route '/api/widget/chat/history'
*/
historyForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: history.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

history.form = historyForm

const WidgetChatController = { start, message, history }

export default WidgetChatController