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

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::index
 * @see app/Http/Controllers/AvailabilityRuleController.php:32
 * @route '/dashboard/availability-rules'
 */
index.url = (options?: RouteQueryOptions) => {
    return index.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\AvailabilityRuleController::index
 * @see app/Http/Controllers/AvailabilityRuleController.php:32
 * @route '/dashboard/availability-rules'
 */
index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: index.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\AvailabilityRuleController::index
 * @see app/Http/Controllers/AvailabilityRuleController.php:32
 * @route '/dashboard/availability-rules'
 */
index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: index.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::index
 * @see app/Http/Controllers/AvailabilityRuleController.php:32
 * @route '/dashboard/availability-rules'
 */
    const indexForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: index.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\AvailabilityRuleController::index
 * @see app/Http/Controllers/AvailabilityRuleController.php:32
 * @route '/dashboard/availability-rules'
 */
        indexForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: index.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\AvailabilityRuleController::index
 * @see app/Http/Controllers/AvailabilityRuleController.php:32
 * @route '/dashboard/availability-rules'
 */
        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\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/create'
 */
export const create = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: create.url(options),
    method: 'get',
})

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/create'
 */
create.url = (options?: RouteQueryOptions) => {
    return create.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/create'
 */
create.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: create.url(options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/create'
 */
create.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: create.url(options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/create'
 */
    const createForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: create.url(options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/create'
 */
        createForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: create.url(options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\AvailabilityRuleController::create
 * @see app/Http/Controllers/AvailabilityRuleController.php:40
 * @route '/dashboard/availability-rules/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\AvailabilityRuleController::store
 * @see app/Http/Controllers/AvailabilityRuleController.php:48
 * @route '/dashboard/availability-rules'
 */
export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::store
 * @see app/Http/Controllers/AvailabilityRuleController.php:48
 * @route '/dashboard/availability-rules'
 */
store.url = (options?: RouteQueryOptions) => {
    return store.definition.url + queryParams(options)
}

/**
* @see \App\Http\Controllers\AvailabilityRuleController::store
 * @see app/Http/Controllers/AvailabilityRuleController.php:48
 * @route '/dashboard/availability-rules'
 */
store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({
    url: store.url(options),
    method: 'post',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::store
 * @see app/Http/Controllers/AvailabilityRuleController.php:48
 * @route '/dashboard/availability-rules'
 */
    const storeForm = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
        action: store.url(options),
        method: 'post',
    })

            /**
* @see \App\Http\Controllers\AvailabilityRuleController::store
 * @see app/Http/Controllers/AvailabilityRuleController.php:48
 * @route '/dashboard/availability-rules'
 */
        storeForm.post = (options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: store.url(options),
            method: 'post',
        })
    
    store.form = storeForm
/**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
export const show = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})

show.definition = {
    methods: ["get","head"],
    url: '/dashboard/availability-rules/{availability_rule}',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
show.url = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { availability_rule: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        availability_rule: args.availability_rule,
                }

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
show.get = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: show.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
show.head = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: show.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
    const showForm = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: show.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
        showForm.get = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: show.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\AvailabilityRuleController::show
 * @see app/Http/Controllers/AvailabilityRuleController.php:82
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
        showForm.head = (args: { availability_rule: string | number } | [availability_rule: 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\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
export const edit = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: edit.url(args, options),
    method: 'get',
})

edit.definition = {
    methods: ["get","head"],
    url: '/dashboard/availability-rules/{availability_rule}/edit',
} satisfies RouteDefinition<["get","head"]>

/**
* @see \App\Http\Controllers\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
edit.url = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { availability_rule: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        availability_rule: args.availability_rule,
                }

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
edit.get = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({
    url: edit.url(args, options),
    method: 'get',
})
/**
* @see \App\Http\Controllers\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
edit.head = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({
    url: edit.url(args, options),
    method: 'head',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
    const editForm = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
        action: edit.url(args, options),
        method: 'get',
    })

            /**
* @see \App\Http\Controllers\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
        editForm.get = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
            action: edit.url(args, options),
            method: 'get',
        })
            /**
* @see \App\Http\Controllers\AvailabilityRuleController::edit
 * @see app/Http/Controllers/AvailabilityRuleController.php:90
 * @route '/dashboard/availability-rules/{availability_rule}/edit'
 */
        editForm.head = (args: { availability_rule: string | number } | [availability_rule: string | number ] | 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\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
export const update = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(args, options),
    method: 'put',
})

update.definition = {
    methods: ["put","patch"],
    url: '/dashboard/availability-rules/{availability_rule}',
} satisfies RouteDefinition<["put","patch"]>

/**
* @see \App\Http\Controllers\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
update.url = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { availability_rule: args }
    }

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

    args = applyUrlDefaults(args)

    const parsedArgs = {
                        availability_rule: args.availability_rule,
                }

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
update.put = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'put'> => ({
    url: update.url(args, options),
    method: 'put',
})
/**
* @see \App\Http\Controllers\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
update.patch = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'patch'> => ({
    url: update.url(args, options),
    method: 'patch',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
    const updateForm = (args: { availability_rule: string | number } | [availability_rule: string | number ] | 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\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
        updateForm.put = (args: { availability_rule: string | number } | [availability_rule: string | number ] | 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\AvailabilityRuleController::update
 * @see app/Http/Controllers/AvailabilityRuleController.php:98
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
        updateForm.patch = (args: { availability_rule: string | number } | [availability_rule: string | number ] | string | number, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: update.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'PATCH',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'post',
        })
    
    update.form = updateForm
/**
* @see \App\Http\Controllers\AvailabilityRuleController::destroy
 * @see app/Http/Controllers/AvailabilityRuleController.php:129
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
export const destroy = (args: { availability_rule: number | { id: number } } | [availability_rule: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

destroy.definition = {
    methods: ["delete"],
    url: '/dashboard/availability-rules/{availability_rule}',
} satisfies RouteDefinition<["delete"]>

/**
* @see \App\Http\Controllers\AvailabilityRuleController::destroy
 * @see app/Http/Controllers/AvailabilityRuleController.php:129
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
destroy.url = (args: { availability_rule: number | { id: number } } | [availability_rule: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions) => {
    if (typeof args === 'string' || typeof args === 'number') {
        args = { availability_rule: args }
    }

            if (typeof args === 'object' && !Array.isArray(args) && 'id' in args) {
            args = { availability_rule: args.id }
        }
    
    if (Array.isArray(args)) {
        args = {
                    availability_rule: args[0],
                }
    }

    args = applyUrlDefaults(args)

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

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

/**
* @see \App\Http\Controllers\AvailabilityRuleController::destroy
 * @see app/Http/Controllers/AvailabilityRuleController.php:129
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
destroy.delete = (args: { availability_rule: number | { id: number } } | [availability_rule: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({
    url: destroy.url(args, options),
    method: 'delete',
})

    /**
* @see \App\Http\Controllers\AvailabilityRuleController::destroy
 * @see app/Http/Controllers/AvailabilityRuleController.php:129
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
    const destroyForm = (args: { availability_rule: number | { id: number } } | [availability_rule: number | { id: number } ] | number | { id: 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\AvailabilityRuleController::destroy
 * @see app/Http/Controllers/AvailabilityRuleController.php:129
 * @route '/dashboard/availability-rules/{availability_rule}'
 */
        destroyForm.delete = (args: { availability_rule: number | { id: number } } | [availability_rule: number | { id: number } ] | number | { id: number }, options?: RouteQueryOptions): RouteFormDefinition<'post'> => ({
            action: destroy.url(args, {
                        [options?.mergeQuery ? 'mergeQuery' : 'query']: {
                            _method: 'DELETE',
                            ...(options?.query ?? options?.mergeQuery ?? {}),
                        }
                    }),
            method: 'post',
        })
    
    destroy.form = destroyForm
const AvailabilityRuleController = { index, create, store, show, edit, update, destroy }

export default AvailabilityRuleController