import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition } from './../../wayfinder'
import accounts from './accounts'
import journalEdd021 from './journal'
import reports from './reports'
/**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
export const journal = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: journal.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
journal.url = (options?: RouteQueryOptions) => {
    return journal.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
journal.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: journal.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
journal.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: journal.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
    const journalForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: journal.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
        journalForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: journal.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\AccountingController::journal
 * @see app/Http/Controllers/AccountingController.php:29
 * @route '/accounting/journal'
 */
        journalForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: journal.url({
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    journal.form = journalForm
const accounting = {
    accounts: Object.assign(accounts, accounts),
journal: Object.assign(journal, journalEdd021),
reports: Object.assign(reports, reports),
}

export default accounting