import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../wayfinder'
/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
export const respondEmail = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: respondEmail.url(args, options),
    method: 'get',
})

respondEmail.definition = {
    methods: ["get","head"],
    url: '/quotes/respond/{quoteId}/{decision}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
respondEmail.url = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions) => {
    if (Array.isArray(args)) {
        args = {
            quoteId: args[0],
            decision: args[1],
        }
    }

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quoteId: args.quoteId,
        decision: args.decision,
    }

    return respondEmail.definition.url
            .replace('{quoteId}', parsedArgs.quoteId.toString())
            .replace('{decision}', parsedArgs.decision.toString())
            .replace(/\/+$/, '') + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
respondEmail.get = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: respondEmail.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
respondEmail.head = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: respondEmail.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
const respondEmailForm = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: respondEmail.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
respondEmailForm.get = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: respondEmail.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::respondEmail
* @see app/Http/Controllers/QuotesController.php:671
* @route '/quotes/respond/{quoteId}/{decision}'
*/
respondEmailForm.head = (args: { quoteId: string | number, decision: string | number } | [quoteId: string | number, decision: string | number ], options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: respondEmail.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

respondEmail.form = respondEmailForm

/**
* @see \App\Http\Controllers\QuotesController::index
* @see app/Http/Controllers/QuotesController.php:35
* @route '/quotes'
*/
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\QuotesController::index
* @see app/Http/Controllers/QuotesController.php:35
* @route '/quotes'
*/
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuotesController::index
* @see app/Http/Controllers/QuotesController.php:35
* @route '/quotes'
*/
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::index
* @see app/Http/Controllers/QuotesController.php:35
* @route '/quotes'
*/
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

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

/**
* @see \App\Http\Controllers\QuotesController::index
* @see app/Http/Controllers/QuotesController.php:35
* @route '/quotes'
*/
indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::index
* @see app/Http/Controllers/QuotesController.php:35
* @route '/quotes'
*/
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\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
export const create = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: create.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
create.url = (options?: RouteQueryOptions) => {
    return create.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
create.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: create.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
create.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: create.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
const createForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: create.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
createForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: create.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::create
* @see app/Http/Controllers/QuotesController.php:164
* @route '/quotes/create'
*/
createForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: create.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

create.form = createForm

/**
* @see \App\Http\Controllers\QuotesController::store
* @see app/Http/Controllers/QuotesController.php:294
* @route '/quotes'
*/
export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

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

/**
* @see \App\Http\Controllers\QuotesController::store
* @see app/Http/Controllers/QuotesController.php:294
* @route '/quotes'
*/
store.url = (options?: RouteQueryOptions) => {
    return store.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\QuotesController::store
* @see app/Http/Controllers/QuotesController.php:294
* @route '/quotes'
*/
store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

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

/**
* @see \App\Http\Controllers\QuotesController::store
* @see app/Http/Controllers/QuotesController.php:294
* @route '/quotes'
*/
storeForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: store.url(options),
    method: 'post',
})

store.form = storeForm

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
export const show = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
show.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
show.get = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
show.head = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
const showForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
showForm.get = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::show
* @see app/Http/Controllers/QuotesController.php:324
* @route '/quotes/{quote}'
*/
showForm.head = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: 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\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
export const edit = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: edit.url(args, options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
edit.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
edit.get = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: edit.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
edit.head = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: edit.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
const editForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: edit.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
editForm.get = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: edit.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::edit
* @see app/Http/Controllers/QuotesController.php:384
* @route '/quotes/{quote}/edit'
*/
editForm.head = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: edit.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

edit.form = editForm

/**
* @see \App\Http\Controllers\QuotesController::update
* @see app/Http/Controllers/QuotesController.php:427
* @route '/quotes/{quote}'
*/
export const update = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(args, options),
    method: 'put',
})

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

/**
* @see \App\Http\Controllers\QuotesController::update
* @see app/Http/Controllers/QuotesController.php:427
* @route '/quotes/{quote}'
*/
update.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::update
* @see app/Http/Controllers/QuotesController.php:427
* @route '/quotes/{quote}'
*/
update.put = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(args, options),
    method: 'put',
})

/**
* @see \App\Http\Controllers\QuotesController::update
* @see app/Http/Controllers/QuotesController.php:427
* @route '/quotes/{quote}'
*/
const updateForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: update.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PUT',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::update
* @see app/Http/Controllers/QuotesController.php:427
* @route '/quotes/{quote}'
*/
updateForm.put = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: update.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PUT',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

update.form = updateForm

/**
* @see \App\Http\Controllers\QuotesController::destroy
* @see app/Http/Controllers/QuotesController.php:438
* @route '/quotes/{quote}'
*/
export const destroy = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

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

/**
* @see \App\Http\Controllers\QuotesController::destroy
* @see app/Http/Controllers/QuotesController.php:438
* @route '/quotes/{quote}'
*/
destroy.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::destroy
* @see app/Http/Controllers/QuotesController.php:438
* @route '/quotes/{quote}'
*/
destroy.delete = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

/**
* @see \App\Http\Controllers\QuotesController::destroy
* @see app/Http/Controllers/QuotesController.php:438
* @route '/quotes/{quote}'
*/
const destroyForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: 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\QuotesController::destroy
* @see app/Http/Controllers/QuotesController.php:438
* @route '/quotes/{quote}'
*/
destroyForm.delete = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: 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\QuotesController::convertToJobcard
* @see app/Http/Controllers/QuotesController.php:467
* @route '/quotes/{quote}/convert-to-jobcard'
*/
export const convertToJobcard = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: convertToJobcard.url(args, options),
    method: 'post',
})

convertToJobcard.definition = {
    methods: ["post"],
    url: '/quotes/{quote}/convert-to-jobcard',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\QuotesController::convertToJobcard
* @see app/Http/Controllers/QuotesController.php:467
* @route '/quotes/{quote}/convert-to-jobcard'
*/
convertToJobcard.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::convertToJobcard
* @see app/Http/Controllers/QuotesController.php:467
* @route '/quotes/{quote}/convert-to-jobcard'
*/
convertToJobcard.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: convertToJobcard.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::convertToJobcard
* @see app/Http/Controllers/QuotesController.php:467
* @route '/quotes/{quote}/convert-to-jobcard'
*/
const convertToJobcardForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: convertToJobcard.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::convertToJobcard
* @see app/Http/Controllers/QuotesController.php:467
* @route '/quotes/{quote}/convert-to-jobcard'
*/
convertToJobcardForm.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: convertToJobcard.url(args, options),
    method: 'post',
})

convertToJobcard.form = convertToJobcardForm

/**
* @see \App\Http\Controllers\QuotesController::convertToInvoice
* @see app/Http/Controllers/QuotesController.php:492
* @route '/quotes/{quote}/convert-to-invoice'
*/
export const convertToInvoice = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: convertToInvoice.url(args, options),
    method: 'post',
})

convertToInvoice.definition = {
    methods: ["post"],
    url: '/quotes/{quote}/convert-to-invoice',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\QuotesController::convertToInvoice
* @see app/Http/Controllers/QuotesController.php:492
* @route '/quotes/{quote}/convert-to-invoice'
*/
convertToInvoice.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::convertToInvoice
* @see app/Http/Controllers/QuotesController.php:492
* @route '/quotes/{quote}/convert-to-invoice'
*/
convertToInvoice.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: convertToInvoice.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::convertToInvoice
* @see app/Http/Controllers/QuotesController.php:492
* @route '/quotes/{quote}/convert-to-invoice'
*/
const convertToInvoiceForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: convertToInvoice.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::convertToInvoice
* @see app/Http/Controllers/QuotesController.php:492
* @route '/quotes/{quote}/convert-to-invoice'
*/
convertToInvoiceForm.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: convertToInvoice.url(args, options),
    method: 'post',
})

convertToInvoice.form = convertToInvoiceForm

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
export const downloadPdf = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: downloadPdf.url(args, options),
    method: 'get',
})

downloadPdf.definition = {
    methods: ["get","head"],
    url: '/quotes/{quote}/download-pdf',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
downloadPdf.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
downloadPdf.get = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: downloadPdf.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
downloadPdf.head = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: downloadPdf.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
const downloadPdfForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: downloadPdf.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
downloadPdfForm.get = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: downloadPdf.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\QuotesController::downloadPdf
* @see app/Http/Controllers/QuotesController.php:505
* @route '/quotes/{quote}/download-pdf'
*/
downloadPdfForm.head = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: downloadPdf.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

downloadPdf.form = downloadPdfForm

/**
* @see \App\Http\Controllers\QuotesController::email
* @see app/Http/Controllers/QuotesController.php:546
* @route '/quotes/{quote}/email'
*/
export const email = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: email.url(args, options),
    method: 'post',
})

email.definition = {
    methods: ["post"],
    url: '/quotes/{quote}/email',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\QuotesController::email
* @see app/Http/Controllers/QuotesController.php:546
* @route '/quotes/{quote}/email'
*/
email.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::email
* @see app/Http/Controllers/QuotesController.php:546
* @route '/quotes/{quote}/email'
*/
email.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: email.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::email
* @see app/Http/Controllers/QuotesController.php:546
* @route '/quotes/{quote}/email'
*/
const emailForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: email.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::email
* @see app/Http/Controllers/QuotesController.php:546
* @route '/quotes/{quote}/email'
*/
emailForm.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: email.url(args, options),
    method: 'post',
})

email.form = emailForm

/**
* @see \App\Http\Controllers\QuotesController::sign
* @see app/Http/Controllers/QuotesController.php:728
* @route '/quotes/{quote}/sign'
*/
export const sign = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: sign.url(args, options),
    method: 'post',
})

sign.definition = {
    methods: ["post"],
    url: '/quotes/{quote}/sign',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\QuotesController::sign
* @see app/Http/Controllers/QuotesController.php:728
* @route '/quotes/{quote}/sign'
*/
sign.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::sign
* @see app/Http/Controllers/QuotesController.php:728
* @route '/quotes/{quote}/sign'
*/
sign.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: sign.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::sign
* @see app/Http/Controllers/QuotesController.php:728
* @route '/quotes/{quote}/sign'
*/
const signForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: sign.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::sign
* @see app/Http/Controllers/QuotesController.php:728
* @route '/quotes/{quote}/sign'
*/
signForm.post = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: sign.url(args, options),
    method: 'post',
})

sign.form = signForm

/**
* @see \App\Http\Controllers\QuotesController::updateStatus
* @see app/Http/Controllers/QuotesController.php:451
* @route '/quotes/{quote}/status'
*/
export const updateStatus = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: updateStatus.url(args, options),
    method: 'patch',
})

updateStatus.definition = {
    methods: ["patch"],
    url: '/quotes/{quote}/status',
} satisfies RouteDefinition<["patch"]>

/**
* @see \App\Http\Controllers\QuotesController::updateStatus
* @see app/Http/Controllers/QuotesController.php:451
* @route '/quotes/{quote}/status'
*/
updateStatus.url = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { quote: args }
    }

    if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
        args = { quote: args.id }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        quote: typeof args.quote === 'object'
        ? args.quote.id
        : args.quote,
    }

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

/**
* @see \App\Http\Controllers\QuotesController::updateStatus
* @see app/Http/Controllers/QuotesController.php:451
* @route '/quotes/{quote}/status'
*/
updateStatus.patch = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: updateStatus.url(args, options),
    method: 'patch',
})

/**
* @see \App\Http\Controllers\QuotesController::updateStatus
* @see app/Http/Controllers/QuotesController.php:451
* @route '/quotes/{quote}/status'
*/
const updateStatusForm = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: updateStatus.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PATCH',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

/**
* @see \App\Http\Controllers\QuotesController::updateStatus
* @see app/Http/Controllers/QuotesController.php:451
* @route '/quotes/{quote}/status'
*/
updateStatusForm.patch = (args: { quote: string | number | { id: string | number } } | [quote: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: updateStatus.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'PATCH',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'post',
})

updateStatus.form = updateStatusForm

const quotes = {
    respondEmail: Object.assign(respondEmail, respondEmail),
    index: Object.assign(index, index),
    create: Object.assign(create, create),
    store: Object.assign(store, store),
    show: Object.assign(show, show),
    edit: Object.assign(edit, edit),
    update: Object.assign(update, update),
    destroy: Object.assign(destroy, destroy),
    convertToJobcard: Object.assign(convertToJobcard, convertToJobcard),
    convertToInvoice: Object.assign(convertToInvoice, convertToInvoice),
    downloadPdf: Object.assign(downloadPdf, downloadPdf),
    email: Object.assign(email, email),
    sign: Object.assign(sign, sign),
    updateStatus: Object.assign(updateStatus, updateStatus),
}

export default quotes