import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../wayfinder'
import users from './users'
import investmentSettings from './investment-settings'
import notificationSettings from './notification-settings'
import legalDocuments from './legal-documents'
import forexImport from './forex-import'
import investments from './investments'
import platformAccrual from './platform-accrual'
import confirm from './confirm'
import debug from './debug'
import balances from './balances'
import withdrawals from './withdrawals'
import kyc from './kyc'
/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
export const home = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: home.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
home.url = (options?: RouteQueryOptions) => {
    return home.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
home.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: home.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
home.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: home.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
const homeForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: home.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
homeForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: home.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\AdminDashboardController::home
* @see app/Http/Controllers/Admin/AdminDashboardController.php:18
* @route '/admin'
*/
homeForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: home.url({
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

home.form = homeForm

const admin = {
    home: Object.assign(home, home),
    users: Object.assign(users, users),
    investmentSettings: Object.assign(investmentSettings, investmentSettings),
    notificationSettings: Object.assign(notificationSettings, notificationSettings),
    legalDocuments: Object.assign(legalDocuments, legalDocuments),
    forexImport: Object.assign(forexImport, forexImport),
    investments: Object.assign(investments, investments),
    platformAccrual: Object.assign(platformAccrual, platformAccrual),
    confirm: Object.assign(confirm, confirm),
    debug: Object.assign(debug, debug),
    balances: Object.assign(balances, balances),
    withdrawals: Object.assign(withdrawals, withdrawals),
    kyc: Object.assign(kyc, kyc),
}

export default admin