import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../wayfinder'
/**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
    const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: index.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
        indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: index.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\ExchangeRateController::index
 * @see app/Http/Controllers/ExchangeRateController.php:19
 * @route '/dashboard/exchange-rates'
 */
        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\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/create'
 */
export const create = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: create.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/create'
 */
create.url = (options?: RouteQueryOptions) => {
    return create.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/create'
 */
create.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: create.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/create'
 */
create.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: create.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/create'
 */
    const createForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: create.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/create'
 */
        createForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: create.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\ExchangeRateController::create
 * @see app/Http/Controllers/ExchangeRateController.php:40
 * @route '/dashboard/exchange-rates/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\ExchangeRateController::store
 * @see app/Http/Controllers/ExchangeRateController.php:48
 * @route '/dashboard/exchange-rates'
 */
export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

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

/**
* @see \App\Http\Controllers\ExchangeRateController::store
 * @see app/Http/Controllers/ExchangeRateController.php:48
 * @route '/dashboard/exchange-rates'
 */
store.url = (options?: RouteQueryOptions) => {
    return store.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\ExchangeRateController::store
 * @see app/Http/Controllers/ExchangeRateController.php:48
 * @route '/dashboard/exchange-rates'
 */
store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::store
 * @see app/Http/Controllers/ExchangeRateController.php:48
 * @route '/dashboard/exchange-rates'
 */
    const storeForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: store.url(options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\ExchangeRateController::store
 * @see app/Http/Controllers/ExchangeRateController.php:48
 * @route '/dashboard/exchange-rates'
 */
        storeForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: store.url(options),
            method: 'post',
        })
    
    store.form = storeForm
/**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
export const show = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

show.definition = {
    methods: ["get","head"],
    url: '/dashboard/exchange-rates/{exchange_rate}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
show.url = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { exchange_rate: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        exchange_rate: args.exchange_rate,
                }

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

/**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
show.get = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
show.head = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
    const showForm = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: show.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
        showForm.get = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: show.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\ExchangeRateController::show
 * @see app/Http/Controllers/ExchangeRateController.php:76
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
        showForm.head = (args: { exchange_rate: string | number } | [exchange_rate: 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\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
export const edit = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: edit.url(args, options),
    method: 'get',
})

edit.definition = {
    methods: ["get","head"],
    url: '/dashboard/exchange-rates/{exchange_rate}/edit',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
edit.url = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { exchange_rate: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        exchange_rate: args.exchange_rate,
                }

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

/**
* @see \App\Http\Controllers\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
edit.get = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: edit.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
edit.head = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: edit.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
    const editForm = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: edit.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
        editForm.get = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: edit.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\ExchangeRateController::edit
 * @see app/Http/Controllers/ExchangeRateController.php:84
 * @route '/dashboard/exchange-rates/{exchange_rate}/edit'
 */
        editForm.head = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | 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\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
export const update = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(args, options),
    method: 'put',
})

update.definition = {
    methods: ["put","patch"],
    url: '/dashboard/exchange-rates/{exchange_rate}',
} satisfies RouteDefinition<["put","patch"]>

/**
* @see \App\Http\Controllers\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
update.url = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { exchange_rate: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        exchange_rate: args.exchange_rate,
                }

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

/**
* @see \App\Http\Controllers\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
update.put = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(args, options),
    method: 'put',
})
/**
* @see \App\Http\Controllers\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
update.patch = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: update.url(args, options),
    method: 'patch',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
    const updateForm = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | 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\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
        updateForm.put = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | 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\ExchangeRateController::update
 * @see app/Http/Controllers/ExchangeRateController.php:92
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
        updateForm.patch = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: update.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'PATCH',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'post',
        })
    
    update.form = updateForm
/**
* @see \App\Http\Controllers\ExchangeRateController::destroy
 * @see app/Http/Controllers/ExchangeRateController.php:133
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
export const destroy = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

destroy.definition = {
    methods: ["delete"],
    url: '/dashboard/exchange-rates/{exchange_rate}',
} satisfies RouteDefinition<["delete"]>

/**
* @see \App\Http\Controllers\ExchangeRateController::destroy
 * @see app/Http/Controllers/ExchangeRateController.php:133
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
destroy.url = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { exchange_rate: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        exchange_rate: args.exchange_rate,
                }

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

/**
* @see \App\Http\Controllers\ExchangeRateController::destroy
 * @see app/Http/Controllers/ExchangeRateController.php:133
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
destroy.delete = (args: { exchange_rate: string | number } | [exchange_rate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

    /**
* @see \App\Http\Controllers\ExchangeRateController::destroy
 * @see app/Http/Controllers/ExchangeRateController.php:133
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
    const destroyForm = (args: { exchange_rate: string | number } | [exchange_rate: 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\ExchangeRateController::destroy
 * @see app/Http/Controllers/ExchangeRateController.php:133
 * @route '/dashboard/exchange-rates/{exchange_rate}'
 */
        destroyForm.delete = (args: { exchange_rate: string | number } | [exchange_rate: 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
const exchangeRates = {
    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),
}

export default exchangeRates