import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../../wayfinder'
/**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
    const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: index.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
        indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: index.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Partner\TokenController::index
 * @see app/Http/Controllers/Partner/TokenController.php:26
 * @route '/partner/token'
 */
        indexForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: index.url({
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    index.form = indexForm
/**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
export const refresh = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: refresh.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
refresh.url = (options?: RouteQueryOptions) => {
    return refresh.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
refresh.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: refresh.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
refresh.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: refresh.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
    const refreshForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: refresh.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
        refreshForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: refresh.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Partner\TokenController::refresh
 * @see app/Http/Controllers/Partner/TokenController.php:48
 * @route '/partner/token/refresh'
 */
        refreshForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: refresh.url({
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    refresh.form = refreshForm
/**
* @see \App\Http\Controllers\Partner\TokenController::store
 * @see app/Http/Controllers/Partner/TokenController.php:88
 * @route '/partner/token'
 */
export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

store.definition = {
    methods: ["post"],
    url: '/partner/token',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Partner\TokenController::store
 * @see app/Http/Controllers/Partner/TokenController.php:88
 * @route '/partner/token'
 */
store.url = (options?: RouteQueryOptions) => {
    return store.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\TokenController::store
 * @see app/Http/Controllers/Partner/TokenController.php:88
 * @route '/partner/token'
 */
store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\Partner\TokenController::store
 * @see app/Http/Controllers/Partner/TokenController.php:88
 * @route '/partner/token'
 */
    const storeForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: store.url(options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\Partner\TokenController::store
 * @see app/Http/Controllers/Partner/TokenController.php:88
 * @route '/partner/token'
 */
        storeForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: store.url(options),
            method: 'post',
        })
    
    store.form = storeForm
/**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
export const show = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
show.url = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { token: args }
    }

    
    if (Array.isArray(args)) {
        args = {
                    token: args[0],
                }
    }

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        token: args.token,
                }

    return show.definition.url
            .replace('{token}', parsedArgs.token.toString())
            .replace(/\/+$/, '') + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
show.get = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
show.head = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
    const showForm = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: show.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
        showForm.get = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: show.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Partner\TokenController::show
 * @see app/Http/Controllers/Partner/TokenController.php:62
 * @route '/partner/token/{token}'
 */
        showForm.head = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: show.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    show.form = showForm
/**
* @see \App\Http\Controllers\Partner\TokenController::destroy
 * @see app/Http/Controllers/Partner/TokenController.php:121
 * @route '/partner/token/{token}'
 */
export const destroy = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

destroy.definition = {
    methods: ["delete"],
    url: '/partner/token/{token}',
} satisfies RouteDefinition<["delete"]>

/**
* @see \App\Http\Controllers\Partner\TokenController::destroy
 * @see app/Http/Controllers/Partner/TokenController.php:121
 * @route '/partner/token/{token}'
 */
destroy.url = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { token: args }
    }

    
    if (Array.isArray(args)) {
        args = {
                    token: args[0],
                }
    }

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        token: args.token,
                }

    return destroy.definition.url
            .replace('{token}', parsedArgs.token.toString())
            .replace(/\/+$/, '') + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\TokenController::destroy
 * @see app/Http/Controllers/Partner/TokenController.php:121
 * @route '/partner/token/{token}'
 */
destroy.delete = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

    /**
* @see \App\Http\Controllers\Partner\TokenController::destroy
 * @see app/Http/Controllers/Partner/TokenController.php:121
 * @route '/partner/token/{token}'
 */
    const destroyForm = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: destroy.url(args, {
                    [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                        _method: 'DELETE',
                        ...(options?.query ?? options?.mergeQuery ?? {}),
                    }
                }),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\Partner\TokenController::destroy
 * @see app/Http/Controllers/Partner/TokenController.php:121
 * @route '/partner/token/{token}'
 */
        destroyForm.delete = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: destroy.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'DELETE',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'post',
        })
    
    destroy.form = destroyForm
/**
* @see \App\Http\Controllers\Partner\TokenController::reset
 * @see app/Http/Controllers/Partner/TokenController.php:156
 * @route '/partner/token/{token}/reset'
 */
export const reset = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: reset.url(args, options),
    method: 'post',
})

reset.definition = {
    methods: ["post"],
    url: '/partner/token/{token}/reset',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Partner\TokenController::reset
 * @see app/Http/Controllers/Partner/TokenController.php:156
 * @route '/partner/token/{token}/reset'
 */
reset.url = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { token: args }
    }

    
    if (Array.isArray(args)) {
        args = {
                    token: args[0],
                }
    }

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        token: args.token,
                }

    return reset.definition.url
            .replace('{token}', parsedArgs.token.toString())
            .replace(/\/+$/, '') + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\TokenController::reset
 * @see app/Http/Controllers/Partner/TokenController.php:156
 * @route '/partner/token/{token}/reset'
 */
reset.post = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: reset.url(args, options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\Partner\TokenController::reset
 * @see app/Http/Controllers/Partner/TokenController.php:156
 * @route '/partner/token/{token}/reset'
 */
    const resetForm = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: reset.url(args, options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\Partner\TokenController::reset
 * @see app/Http/Controllers/Partner/TokenController.php:156
 * @route '/partner/token/{token}/reset'
 */
        resetForm.post = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: reset.url(args, options),
            method: 'post',
        })
    
    reset.form = resetForm
const token = {
    index: Object.assign(index, index),
refresh: Object.assign(refresh, refresh),
store: Object.assign(store, store),
show: Object.assign(show, show),
destroy: Object.assign(destroy, destroy),
reset: Object.assign(reset, reset),
}

export default token