import { queryParams, type RouteQueryOptions, type RouteDefinition, type RouteFormDefinition, applyUrlDefaults } from './../../../../../wayfinder'
/**
* @see \App\Http\Controllers\Client\RoomController::search
 * @see app/Http/Controllers/Client/RoomController.php:24
 * @route '/search-rooms'
 */
export const search = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: search.url(options),
    method: 'post',
})

search.definition = {
    methods: ["post"],
    url: '/search-rooms',
} satisfies RouteDefinition<["post"]>

/**
* @see \App\Http\Controllers\Client\RoomController::search
 * @see app/Http/Controllers/Client/RoomController.php:24
 * @route '/search-rooms'
 */
search.url = (options?: RouteQueryOptions) => {
    return search.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Client\RoomController::search
 * @see app/Http/Controllers/Client/RoomController.php:24
 * @route '/search-rooms'
 */
search.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: search.url(options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\Client\RoomController::search
 * @see app/Http/Controllers/Client/RoomController.php:24
 * @route '/search-rooms'
 */
    const searchForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: search.url(options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\Client\RoomController::search
 * @see app/Http/Controllers/Client/RoomController.php:24
 * @route '/search-rooms'
 */
        searchForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: search.url(options),
            method: 'post',
        })
    
    search.form = searchForm
/**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
export const rooms = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: rooms.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
rooms.url = (options?: RouteQueryOptions) => {
    return rooms.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
rooms.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: rooms.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
rooms.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: rooms.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
    const roomsForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: rooms.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
        roomsForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: rooms.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Client\RoomController::rooms
 * @see app/Http/Controllers/Client/RoomController.php:40
 * @route '/rooms'
 */
        roomsForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: rooms.url({
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    rooms.form = roomsForm
/**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
export const show = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
show.url = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { slug: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        slug: args.slug,
                }

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

/**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
show.get = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
show.head = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
    const showForm = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: show.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
        showForm.get = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: show.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Client\RoomController::show
 * @see app/Http/Controllers/Client/RoomController.php:78
 * @route '/rooms/{slug}'
 */
        showForm.head = (args: { slug: string | number } | [slug: 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\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
export const showAll = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: showAll.url(args, options),
    method: 'get',
})

showAll.definition = {
    methods: ["get","head"],
    url: '/all-rooms/{slug}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
showAll.url = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { slug: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        slug: args.slug,
                }

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

/**
* @see \App\Http\Controllers\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
showAll.get = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: showAll.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
showAll.head = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: showAll.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
    const showAllForm = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: showAll.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
        showAllForm.get = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: showAll.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\Client\RoomController::showAll
 * @see app/Http/Controllers/Client/RoomController.php:134
 * @route '/all-rooms/{slug}'
 */
        showAllForm.head = (args: { slug: string | number } | [slug: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: showAll.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'HEAD',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'get',
        })
    
    showAll.form = showAllForm
const RoomController = { search, rooms, show, showAll }

export default RoomController