import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../wayfinder'
/**
* @see \App\Http\Controllers\Partner\SettingsController::update
 * @see app/Http/Controllers/Partner/SettingsController.php:104
 * @route '/partner/settings/custom'
 */
export const update = (options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(options),
    method: 'put',
})

update.definition = {
    methods: ["put"],
    url: '/partner/settings/custom',
} satisfies RouteDefinition<["put"]>

/**
* @see \App\Http\Controllers\Partner\SettingsController::update
 * @see app/Http/Controllers/Partner/SettingsController.php:104
 * @route '/partner/settings/custom'
 */
update.url = (options?: RouteQueryOptions) => {
    return update.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Partner\SettingsController::update
 * @see app/Http/Controllers/Partner/SettingsController.php:104
 * @route '/partner/settings/custom'
 */
update.put = (options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(options),
    method: 'put',
})

    /**
* @see \App\Http\Controllers\Partner\SettingsController::update
 * @see app/Http/Controllers/Partner/SettingsController.php:104
 * @route '/partner/settings/custom'
 */
    const updateForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: update.url({
                    [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                        _method: 'PUT',
                        ...(options?.query ?? options?.mergeQuery ?? {}),
                    }
                }),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\Partner\SettingsController::update
 * @see app/Http/Controllers/Partner/SettingsController.php:104
 * @route '/partner/settings/custom'
 */
        updateForm.put = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: update.url({
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'PUT',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'post',
        })
    
    update.form = updateForm
const custom = {
    update: Object.assign(update, update),
}

export default custom