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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
* @see \App\Http\Controllers\LicenseController::create
* @see app/Http/Controllers/LicenseController.php:72
* @route '/licenses/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\LicenseController::store
* @see app/Http/Controllers/LicenseController.php:88
* @route '/licenses'
*/
export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

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

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

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

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

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

store.form = storeForm

/**
* @see \App\Http\Controllers\LicenseController::show
* @see app/Http/Controllers/LicenseController.php:126
* @route '/licenses/{license}'
*/
export const show = (args: { license: string | number | { id: string | number } } | [license: 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: '/licenses/{license}',
} satisfies RouteDefinition<["get","head"]>

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

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::show
* @see app/Http/Controllers/LicenseController.php:126
* @route '/licenses/{license}'
*/
show.get = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::show
* @see app/Http/Controllers/LicenseController.php:126
* @route '/licenses/{license}'
*/
show.head = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::show
* @see app/Http/Controllers/LicenseController.php:126
* @route '/licenses/{license}'
*/
const showForm = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::show
* @see app/Http/Controllers/LicenseController.php:126
* @route '/licenses/{license}'
*/
showForm.get = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::show
* @see app/Http/Controllers/LicenseController.php:126
* @route '/licenses/{license}'
*/
showForm.head = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::edit
* @see app/Http/Controllers/LicenseController.php:144
* @route '/licenses/{license}/edit'
*/
export const edit = (args: { license: string | number | { id: string | number } } | [license: 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: '/licenses/{license}/edit',
} satisfies RouteDefinition<["get","head"]>

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

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::edit
* @see app/Http/Controllers/LicenseController.php:144
* @route '/licenses/{license}/edit'
*/
edit.get = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::edit
* @see app/Http/Controllers/LicenseController.php:144
* @route '/licenses/{license}/edit'
*/
edit.head = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::edit
* @see app/Http/Controllers/LicenseController.php:144
* @route '/licenses/{license}/edit'
*/
const editForm = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::edit
* @see app/Http/Controllers/LicenseController.php:144
* @route '/licenses/{license}/edit'
*/
editForm.get = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::edit
* @see app/Http/Controllers/LicenseController.php:144
* @route '/licenses/{license}/edit'
*/
editForm.head = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::update
* @see app/Http/Controllers/LicenseController.php:168
* @route '/licenses/{license}'
*/
export const update = (args: { license: string | number | { id: string | number } } | [license: 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: '/licenses/{license}',
} satisfies RouteDefinition<["put"]>

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

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::update
* @see app/Http/Controllers/LicenseController.php:168
* @route '/licenses/{license}'
*/
update.put = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::update
* @see app/Http/Controllers/LicenseController.php:168
* @route '/licenses/{license}'
*/
const updateForm = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::update
* @see app/Http/Controllers/LicenseController.php:168
* @route '/licenses/{license}'
*/
updateForm.put = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::destroy
* @see app/Http/Controllers/LicenseController.php:194
* @route '/licenses/{license}'
*/
export const destroy = (args: { license: string | number | { id: string | number } } | [license: 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: '/licenses/{license}',
} satisfies RouteDefinition<["delete"]>

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

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::destroy
* @see app/Http/Controllers/LicenseController.php:194
* @route '/licenses/{license}'
*/
destroy.delete = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::destroy
* @see app/Http/Controllers/LicenseController.php:194
* @route '/licenses/{license}'
*/
const destroyForm = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::destroy
* @see app/Http/Controllers/LicenseController.php:194
* @route '/licenses/{license}'
*/
destroyForm.delete = (args: { license: string | number | { id: string | number } } | [license: 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\LicenseController::deploy
* @see app/Http/Controllers/LicenseController.php:207
* @route '/licenses/{license}/deploy'
*/
export const deploy = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: deploy.url(args, options),
    method: 'post',
})

deploy.definition = {
    methods: ["post"],
    url: '/licenses/{license}/deploy',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\LicenseController::deploy
* @see app/Http/Controllers/LicenseController.php:207
* @route '/licenses/{license}/deploy'
*/
deploy.url = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { license: args }
    }

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::deploy
* @see app/Http/Controllers/LicenseController.php:207
* @route '/licenses/{license}/deploy'
*/
deploy.post = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: deploy.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\LicenseController::deploy
* @see app/Http/Controllers/LicenseController.php:207
* @route '/licenses/{license}/deploy'
*/
const deployForm = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: deploy.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\LicenseController::deploy
* @see app/Http/Controllers/LicenseController.php:207
* @route '/licenses/{license}/deploy'
*/
deployForm.post = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: deploy.url(args, options),
    method: 'post',
})

deploy.form = deployForm

/**
* @see \App\Http\Controllers\LicenseController::upgrade
* @see app/Http/Controllers/LicenseController.php:309
* @route '/licenses/{license}/upgrade'
*/
export const upgrade = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: upgrade.url(args, options),
    method: 'post',
})

upgrade.definition = {
    methods: ["post"],
    url: '/licenses/{license}/upgrade',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\LicenseController::upgrade
* @see app/Http/Controllers/LicenseController.php:309
* @route '/licenses/{license}/upgrade'
*/
upgrade.url = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { license: args }
    }

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::upgrade
* @see app/Http/Controllers/LicenseController.php:309
* @route '/licenses/{license}/upgrade'
*/
upgrade.post = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: upgrade.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\LicenseController::upgrade
* @see app/Http/Controllers/LicenseController.php:309
* @route '/licenses/{license}/upgrade'
*/
const upgradeForm = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: upgrade.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\LicenseController::upgrade
* @see app/Http/Controllers/LicenseController.php:309
* @route '/licenses/{license}/upgrade'
*/
upgradeForm.post = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: upgrade.url(args, options),
    method: 'post',
})

upgrade.form = upgradeForm

/**
* @see \App\Http\Controllers\LicenseController::forceSSL
* @see app/Http/Controllers/LicenseController.php:390
* @route '/licenses/{license}/force-ssl'
*/
export const forceSSL = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: forceSSL.url(args, options),
    method: 'post',
})

forceSSL.definition = {
    methods: ["post"],
    url: '/licenses/{license}/force-ssl',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\LicenseController::forceSSL
* @see app/Http/Controllers/LicenseController.php:390
* @route '/licenses/{license}/force-ssl'
*/
forceSSL.url = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { license: args }
    }

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

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

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\LicenseController::forceSSL
* @see app/Http/Controllers/LicenseController.php:390
* @route '/licenses/{license}/force-ssl'
*/
forceSSL.post = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: forceSSL.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\LicenseController::forceSSL
* @see app/Http/Controllers/LicenseController.php:390
* @route '/licenses/{license}/force-ssl'
*/
const forceSSLForm = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: forceSSL.url(args, options),
    method: 'post',
})

/**
* @see \App\Http\Controllers\LicenseController::forceSSL
* @see app/Http/Controllers/LicenseController.php:390
* @route '/licenses/{license}/force-ssl'
*/
forceSSLForm.post = (args: { license: string | number | { id: string | number } } | [license: string | number | { id: string | number } ] | string | number | { id: string | number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
    action: forceSSL.url(args, options),
    method: 'post',
})

forceSSL.form = forceSSLForm

const licenses = {
    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),
    deploy: Object.assign(deploy, deploy),
    upgrade: Object.assign(upgrade, upgrade),
    forceSSL: Object.assign(forceSSL, forceSSL),
}

export default licenses