import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../../../../wayfinder'
/**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
    const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: index.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
        indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: index.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Api\PartnerSettingController::index
 * @see app/Http/Controllers/Api/PartnerSettingController.php:15
 * @route '/api/v1/settings'
 */
        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\Api\PartnerSettingController::update
 * @see app/Http/Controllers/Api/PartnerSettingController.php:39
 * @route '/api/v1/settings'
 */
export const update = (options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(options),
    method: 'put',
})

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

/**
* @see \App\Http\Controllers\Api\PartnerSettingController::update
 * @see app/Http/Controllers/Api/PartnerSettingController.php:39
 * @route '/api/v1/settings'
 */
update.url = (options?: RouteQueryOptions) => {
    return update.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Api\PartnerSettingController::update
 * @see app/Http/Controllers/Api/PartnerSettingController.php:39
 * @route '/api/v1/settings'
 */
update.put = (options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(options),
    method: 'put',
})

    /**
* @see \App\Http\Controllers\Api\PartnerSettingController::update
 * @see app/Http/Controllers/Api/PartnerSettingController.php:39
 * @route '/api/v1/settings'
 */
    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\Api\PartnerSettingController::update
 * @see app/Http/Controllers/Api/PartnerSettingController.php:39
 * @route '/api/v1/settings'
 */
        updateForm.put = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: update.url({
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'PUT',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'post',
        })
    
    update.form = updateForm
/**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
export const show = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

show.definition = {
    methods: ["get","head"],
    url: '/api/v1/settings/{key}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
show.url = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { key: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        key: args.key,
                }

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

/**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
show.get = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
show.head = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
    const showForm = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: show.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
        showForm.get = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: show.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Api\PartnerSettingController::show
 * @see app/Http/Controllers/Api/PartnerSettingController.php:79
 * @route '/api/v1/settings/{key}'
 */
        showForm.head = (args: { key: string | number } | [key: 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
const PartnerSettingController = { index, update, show }

export default PartnerSettingController