import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../wayfinder'
/**
* @see \App\Http\Controllers\Webhooks\TheThingsStackWebhookController::__invoke
* @see app/Http/Controllers/Webhooks/TheThingsStackWebhookController.php:14
* @route '/webhooks/the-things-stack/uplink'
*/
export const uplink = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: uplink.url(options),
    method: 'post',
})

uplink.definition = {
    methods: ["post"],
    url: '/webhooks/the-things-stack/uplink',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Webhooks\TheThingsStackWebhookController::__invoke
* @see app/Http/Controllers/Webhooks/TheThingsStackWebhookController.php:14
* @route '/webhooks/the-things-stack/uplink'
*/
uplink.url = (options?: RouteQueryOptions) => {
    return uplink.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Webhooks\TheThingsStackWebhookController::__invoke
* @see app/Http/Controllers/Webhooks/TheThingsStackWebhookController.php:14
* @route '/webhooks/the-things-stack/uplink'
*/
uplink.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: uplink.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Webhooks\TheThingsStackWebhookController::__invoke
* @see app/Http/Controllers/Webhooks/TheThingsStackWebhookController.php:14
* @route '/webhooks/the-things-stack/uplink'
*/
const uplinkForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: uplink.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Webhooks\TheThingsStackWebhookController::__invoke
* @see app/Http/Controllers/Webhooks/TheThingsStackWebhookController.php:14
* @route '/webhooks/the-things-stack/uplink'
*/
uplinkForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: uplink.url(options),
    method: 'post',
})

uplink.form = uplinkForm

const theThingsStack = {
    uplink: Object.assign(uplink, uplink),
}

export default theThingsStack