import { Schema, InferIn } from "./adapters/types.mjs"; import { H as HookSafeActionFn, a as HookBaseUtils, b as HookCallbacks, U as UseActionHookReturn, c as UseOptimisticActionHookReturn, } from "./hooks.types-DWbw-OZw.mjs"; export { e as HookActionStatus, d as HookSafeStateActionFn, f as HookShorthandStatus, I as InferUseActionHookReturn, h as InferUseOptimisticActionHookReturn, i as InferUseStateActionHookReturn, g as UseStateActionHookReturn, } from "./hooks.types-DWbw-OZw.mjs"; import "@sinclair/typebox"; import "valibot"; import "yup"; import "zod"; import "./index.types-DMRjZVd3.mjs"; /** * Use the action from a Client Component via hook. * @param safeActionFn The action function * @param utils Optional base utils and callbacks * * {@link https://next-safe-action.dev/docs/execute-actions/hooks/useaction See docs for more information} */ declare const useAction: < ServerError, S extends Schema | undefined, const BAS extends readonly Schema[], CVE, CBAVE, Data, >( safeActionFn: HookSafeActionFn, utils?: HookBaseUtils & HookCallbacks ) => UseActionHookReturn; /** * Use the action from a Client Component via hook, with optimistic data update. * @param safeActionFn The action function * @param utils Required `currentData` and `updateFn` and optional base utils and callbacks * * {@link https://next-safe-action.dev/docs/execute-actions/hooks/useoptimisticaction See docs for more information} */ declare const useOptimisticAction: < ServerError, S extends Schema | undefined, const BAS extends readonly Schema[], CVE, CBAVE, Data, State, >( safeActionFn: HookSafeActionFn, utils: { currentState: State; updateFn: (state: State, input: S extends Schema ? InferIn : undefined) => State; } & HookBaseUtils & HookCallbacks ) => UseOptimisticActionHookReturn; export { HookBaseUtils, HookCallbacks, HookSafeActionFn, UseActionHookReturn, UseOptimisticActionHookReturn, useAction, useOptimisticAction, };