import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../../wayfinder'
/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: index.url(options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::index
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:26
* @route '/admin/acreditacion-mensual'
*/
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\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
export const show = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

show.definition = {
    methods: ["get","head"],
    url: '/admin/acreditacion-mensual/{runDate}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
show.url = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { runDate: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        runDate: args.runDate,
    }

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

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
show.get = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
show.head = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
const showForm = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
showForm.get = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: show.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::show
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:204
* @route '/admin/acreditacion-mensual/{runDate}'
*/
showForm.head = (args: { runDate: string | number } | [runDate: 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\Admin\PlatformMonthlyAccrualController::debugRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:51
* @route '/admin/acreditacion-mensual/ejecutar-prueba'
*/
export const debugRun = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: debugRun.url(options),
    method: 'post',
})

debugRun.definition = {
    methods: ["post"],
    url: '/admin/acreditacion-mensual/ejecutar-prueba',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::debugRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:51
* @route '/admin/acreditacion-mensual/ejecutar-prueba'
*/
debugRun.url = (options?: RouteQueryOptions) => {
    return debugRun.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::debugRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:51
* @route '/admin/acreditacion-mensual/ejecutar-prueba'
*/
debugRun.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: debugRun.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::debugRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:51
* @route '/admin/acreditacion-mensual/ejecutar-prueba'
*/
const debugRunForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: debugRun.url(options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::debugRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:51
* @route '/admin/acreditacion-mensual/ejecutar-prueba'
*/
debugRunForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: debugRun.url(options),
    method: 'post',
})

debugRun.form = debugRunForm

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
export const recalculatePreview = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: recalculatePreview.url(args, options),
    method: 'get',
})

recalculatePreview.definition = {
    methods: ["get","head"],
    url: '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculatePreview.url = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { transaction: args }
    }

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculatePreview.get = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: recalculatePreview.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculatePreview.head = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: recalculatePreview.url(args, options),
    method: 'head',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
const recalculatePreviewForm = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: recalculatePreview.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculatePreviewForm.get = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: recalculatePreview.url(args, options),
    method: 'get',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculatePreview
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:127
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculatePreviewForm.head = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
    action: recalculatePreview.url(args, {
        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
            _method: 'HEAD',
            ...(options?.query ?? options?.mergeQuery ?? {}),
        }
    }),
    method: 'get',
})

recalculatePreview.form = recalculatePreviewForm

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculateApply
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:155
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
export const recalculateApply = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: recalculateApply.url(args, options),
    method: 'post',
})

recalculateApply.definition = {
    methods: ["post"],
    url: '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculateApply
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:155
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculateApply.url = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { transaction: args }
    }

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculateApply
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:155
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculateApply.post = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: recalculateApply.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculateApply
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:155
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
const recalculateApplyForm = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: recalculateApply.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::recalculateApply
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:155
* @route '/admin/acreditacion-mensual/movimientos/{transaction}/recalcular'
*/
recalculateApplyForm.post = (args: { transaction: number | { id: number } } | [transaction: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: recalculateApply.url(args, options),
    method: 'post',
})

recalculateApply.form = recalculateApplyForm

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::voidRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:87
* @route '/admin/acreditacion-mensual/{runDate}/anular'
*/
export const voidRun = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: voidRun.url(args, options),
    method: 'post',
})

voidRun.definition = {
    methods: ["post"],
    url: '/admin/acreditacion-mensual/{runDate}/anular',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::voidRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:87
* @route '/admin/acreditacion-mensual/{runDate}/anular'
*/
voidRun.url = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { runDate: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
        runDate: args.runDate,
    }

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

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::voidRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:87
* @route '/admin/acreditacion-mensual/{runDate}/anular'
*/
voidRun.post = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: voidRun.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::voidRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:87
* @route '/admin/acreditacion-mensual/{runDate}/anular'
*/
const voidRunForm = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: voidRun.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\Admin\PlatformMonthlyAccrualController::voidRun
* @see app/Http/Controllers/Admin/PlatformMonthlyAccrualController.php:87
* @route '/admin/acreditacion-mensual/{runDate}/anular'
*/
voidRunForm.post = (args: { runDate: string | number } | [runDate: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: voidRun.url(args, options),
    method: 'post',
})

voidRun.form = voidRunForm

const platformAccrual = {
    index: Object.assign(index, index),
    show: Object.assign(show, show),
    debugRun: Object.assign(debugRun, debugRun),
    recalculatePreview: Object.assign(recalculatePreview, recalculatePreview),
    recalculateApply: Object.assign(recalculateApply, recalculateApply),
    voidRun: Object.assign(voidRun, voidRun),
}

export default platformAccrual