import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../wayfinder'
import webhookB2f11f from './webhook'
/**
* @see \App\Http\Controllers\Billing\WebhookController::webhook
* @see app/Http/Controllers/Billing/WebhookController.php:40
* @route '/billing/webhook'
*/
export const webhook = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: webhook.url(options),
    method: 'post',
})

webhook.definition = {
    methods: ["post"],
    url: '/billing/webhook',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Billing\WebhookController::webhook
* @see app/Http/Controllers/Billing/WebhookController.php:40
* @route '/billing/webhook'
*/
webhook.url = (options?: RouteQueryOptions) => {
    return webhook.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Billing\WebhookController::webhook
* @see app/Http/Controllers/Billing/WebhookController.php:40
* @route '/billing/webhook'
*/
webhook.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: webhook.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\WebhookController::webhook
* @see app/Http/Controllers/Billing/WebhookController.php:40
* @route '/billing/webhook'
*/
const webhookForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: webhook.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\WebhookController::webhook
* @see app/Http/Controllers/Billing/WebhookController.php:40
* @route '/billing/webhook'
*/
webhookForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: webhook.url(options),
    method: 'post',
})

webhook.form = webhookForm

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
export const show = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(options),
    method: 'get',
})

show.definition = {
    methods: ["get","head"],
    url: '/app/billing',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
show.url = (options?: RouteQueryOptions) => {
    return show.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
show.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
show.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
const showForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
showForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::show
* @see app/Http/Controllers/Admin/BillingController.php:30
* @route '/app/billing'
*/
showForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

show.form = showForm

/**
* @see \App\Http\Controllers\Billing\CheckoutController::__invoke
* @see app/Http/Controllers/Billing/CheckoutController.php:52
* @route '/billing/checkout'
*/
export const checkout = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: checkout.url(options),
    method: 'post',
})

checkout.definition = {
    methods: ["post"],
    url: '/billing/checkout',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Billing\CheckoutController::__invoke
* @see app/Http/Controllers/Billing/CheckoutController.php:52
* @route '/billing/checkout'
*/
checkout.url = (options?: RouteQueryOptions) => {
    return checkout.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Billing\CheckoutController::__invoke
* @see app/Http/Controllers/Billing/CheckoutController.php:52
* @route '/billing/checkout'
*/
checkout.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: checkout.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\CheckoutController::__invoke
* @see app/Http/Controllers/Billing/CheckoutController.php:52
* @route '/billing/checkout'
*/
const checkoutForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: checkout.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\CheckoutController::__invoke
* @see app/Http/Controllers/Billing/CheckoutController.php:52
* @route '/billing/checkout'
*/
checkoutForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: checkout.url(options),
    method: 'post',
})

checkout.form = checkoutForm

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
export const portal = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: portal.url(options),
    method: 'get',
})

portal.definition = {
    methods: ["get","head"],
    url: '/billing/portal',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
portal.url = (options?: RouteQueryOptions) => {
    return portal.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
portal.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: portal.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
portal.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: portal.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
const portalForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: portal.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
portalForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: portal.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\BillingController::portal
* @see app/Http/Controllers/Admin/BillingController.php:132
* @route '/billing/portal'
*/
portalForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: portal.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

portal.form = portalForm

/**
* @see \App\Http\Controllers\Billing\LifecycleController::cancel
* @see app/Http/Controllers/Billing/LifecycleController.php:51
* @route '/billing/cancel'
*/
export const cancel = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: cancel.url(options),
    method: 'post',
})

cancel.definition = {
    methods: ["post"],
    url: '/billing/cancel',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Billing\LifecycleController::cancel
* @see app/Http/Controllers/Billing/LifecycleController.php:51
* @route '/billing/cancel'
*/
cancel.url = (options?: RouteQueryOptions) => {
    return cancel.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Billing\LifecycleController::cancel
* @see app/Http/Controllers/Billing/LifecycleController.php:51
* @route '/billing/cancel'
*/
cancel.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: cancel.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\LifecycleController::cancel
* @see app/Http/Controllers/Billing/LifecycleController.php:51
* @route '/billing/cancel'
*/
const cancelForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: cancel.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\LifecycleController::cancel
* @see app/Http/Controllers/Billing/LifecycleController.php:51
* @route '/billing/cancel'
*/
cancelForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: cancel.url(options),
    method: 'post',
})

cancel.form = cancelForm

/**
* @see \App\Http\Controllers\Billing\LifecycleController::resume
* @see app/Http/Controllers/Billing/LifecycleController.php:120
* @route '/billing/resume'
*/
export const resume = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: resume.url(options),
    method: 'post',
})

resume.definition = {
    methods: ["post"],
    url: '/billing/resume',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Billing\LifecycleController::resume
* @see app/Http/Controllers/Billing/LifecycleController.php:120
* @route '/billing/resume'
*/
resume.url = (options?: RouteQueryOptions) => {
    return resume.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Billing\LifecycleController::resume
* @see app/Http/Controllers/Billing/LifecycleController.php:120
* @route '/billing/resume'
*/
resume.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: resume.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\LifecycleController::resume
* @see app/Http/Controllers/Billing/LifecycleController.php:120
* @route '/billing/resume'
*/
const resumeForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: resume.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\LifecycleController::resume
* @see app/Http/Controllers/Billing/LifecycleController.php:120
* @route '/billing/resume'
*/
resumeForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: resume.url(options),
    method: 'post',
})

resume.form = resumeForm

/**
* @see \App\Http\Controllers\Billing\LifecycleController::swap
* @see app/Http/Controllers/Billing/LifecycleController.php:159
* @route '/billing/swap'
*/
export const swap = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: swap.url(options),
    method: 'post',
})

swap.definition = {
    methods: ["post"],
    url: '/billing/swap',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Billing\LifecycleController::swap
* @see app/Http/Controllers/Billing/LifecycleController.php:159
* @route '/billing/swap'
*/
swap.url = (options?: RouteQueryOptions) => {
    return swap.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Billing\LifecycleController::swap
* @see app/Http/Controllers/Billing/LifecycleController.php:159
* @route '/billing/swap'
*/
swap.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: swap.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\LifecycleController::swap
* @see app/Http/Controllers/Billing/LifecycleController.php:159
* @route '/billing/swap'
*/
const swapForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: swap.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Billing\LifecycleController::swap
* @see app/Http/Controllers/Billing/LifecycleController.php:159
* @route '/billing/swap'
*/
swapForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: swap.url(options),
    method: 'post',
})

swap.form = swapForm

const billing = {
    webhook: Object.assign(webhook, webhookB2f11f),
    show: Object.assign(show, show),
    checkout: Object.assign(checkout, checkout),
    portal: Object.assign(portal, portal),
    cancel: Object.assign(cancel, cancel),
    resume: Object.assign(resume, resume),
    swap: Object.assign(swap, swap),
}

export default billing