import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../../../../../wayfinder'
/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
const SupplierIndexController = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: SupplierIndexController.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
SupplierIndexController.url = (options?: RouteQueryOptions) => {
    return SupplierIndexController.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
SupplierIndexController.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: SupplierIndexController.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
SupplierIndexController.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: SupplierIndexController.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
const SupplierIndexControllerForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: SupplierIndexController.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
SupplierIndexControllerForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: SupplierIndexController.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\PublicApi\V1\SupplierIndexController::__invoke
* @see app/Http/Controllers/PublicApi/V1/SupplierIndexController.php:11
* @route '/api/public/v1/suppliers'
*/
SupplierIndexControllerForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: SupplierIndexController.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

SupplierIndexController.form = SupplierIndexControllerForm

export default SupplierIndexController