import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../wayfinder'
import sync from './sync'
/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
export const authorize = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: authorize.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
authorize.url = (options?: RouteQueryOptions) => {
    return authorize.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
authorize.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: authorize.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
authorize.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: authorize.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
const authorizeForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: authorize.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
authorizeForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: authorize.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::authorize
* @see app/Http/Controllers/QuickBooksSettingsController.php:125
* @route '/quickbooks/authorize'
*/
authorizeForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: authorize.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

authorize.form = authorizeForm

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
export const callback = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: callback.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
callback.url = (options?: RouteQueryOptions) => {
    return callback.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
callback.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: callback.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
callback.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: callback.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
const callbackForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: callback.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
callbackForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: callback.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::callback
* @see app/Http/Controllers/QuickBooksSettingsController.php:139
* @route '/quickbooks/callback'
*/
callbackForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: callback.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

callback.form = callbackForm

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::disconnect
* @see app/Http/Controllers/QuickBooksSettingsController.php:240
* @route '/quickbooks/disconnect'
*/
export const disconnect = (options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: disconnect.url(options),
    method: 'delete',
})

disconnect.definition = {
    methods: ["delete"],
    url: '/quickbooks/disconnect',
} satisfies RouteDefinition<["delete"]>

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::disconnect
* @see app/Http/Controllers/QuickBooksSettingsController.php:240
* @route '/quickbooks/disconnect'
*/
disconnect.url = (options?: RouteQueryOptions) => {
    return disconnect.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::disconnect
* @see app/Http/Controllers/QuickBooksSettingsController.php:240
* @route '/quickbooks/disconnect'
*/
disconnect.delete = (options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: disconnect.url(options),
    method: 'delete',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::disconnect
* @see app/Http/Controllers/QuickBooksSettingsController.php:240
* @route '/quickbooks/disconnect'
*/
const disconnectForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: disconnect.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'DELETE',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::disconnect
* @see app/Http/Controllers/QuickBooksSettingsController.php:240
* @route '/quickbooks/disconnect'
*/
disconnectForm.delete = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: disconnect.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'DELETE',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

disconnect.form = disconnectForm

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::switchCompany
* @see app/Http/Controllers/QuickBooksSettingsController.php:258
* @route '/quickbooks/switch-company'
*/
export const switchCompany = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: switchCompany.url(options),
    method: 'post',
})

switchCompany.definition = {
    methods: ["post"],
    url: '/quickbooks/switch-company',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::switchCompany
* @see app/Http/Controllers/QuickBooksSettingsController.php:258
* @route '/quickbooks/switch-company'
*/
switchCompany.url = (options?: RouteQueryOptions) => {
    return switchCompany.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::switchCompany
* @see app/Http/Controllers/QuickBooksSettingsController.php:258
* @route '/quickbooks/switch-company'
*/
switchCompany.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: switchCompany.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::switchCompany
* @see app/Http/Controllers/QuickBooksSettingsController.php:258
* @route '/quickbooks/switch-company'
*/
const switchCompanyForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: switchCompany.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuickBooksSettingsController::switchCompany
* @see app/Http/Controllers/QuickBooksSettingsController.php:258
* @route '/quickbooks/switch-company'
*/
switchCompanyForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: switchCompany.url(options),
    method: 'post',
})

switchCompany.form = switchCompanyForm

const quickbooks = {
    authorize: Object.assign(authorize, authorize),
    callback: Object.assign(callback, callback),
    disconnect: Object.assign(disconnect, disconnect),
    switchCompany: Object.assign(switchCompany, switchCompany),
    sync: Object.assign(sync, sync),
}

export default quickbooks