/**
 * @see https://foxact.skk.moe/context-reducer
 *
 * Option 1:
 *
 * ```ts
 * createContextReducer<S, A, I = S>(reducer, initialArg: I, init?: (arg: I) => S)
 * ```
 */
declare function createContextReducer<S, A, I = S>(reducer: (state: S, action: A) => S, initialArg: I, init?: (arg: I) => S): [
    Provider: React.ComponentType<React.PropsWithChildren>,
    useValue: () => S,
    useDispatch: () => React.Dispatch<A>,
    StateContext: React.Context<S>
];
/**
 * @see https://foxact.skk.moe/context-reducer
 *
 * Option 2:
 *
 * ```ts
 * createContextReducer<S, A, I = S>(reducer, initialArg?: I, init?: (arg: I) => S)
 * ```
 * Call `initialArg`/`init` in `<Provider>` is optional
 */
declare function createContextReducer<S, A, I = S>(reducer: (state: S, action: A) => S, initialArg?: I, init?: (arg: I) => S): [
    Provider: React.ComponentType<React.PropsWithChildren<{
        initialArg?: I;
        init?: (arg: I) => S;
    }>>,
    useValue: () => S,
    useDispatch: () => React.Dispatch<A>,
    StateContext: React.Context<S>
];
/**
 * @see https://foxact.skk.moe/context-reducer
 *
 * Option 3:
 *
 * ```ts
 * createContextReducer<S, A, I = S>(reducer)
 * ```
 * Provide `initialArg` and/or `init` via `<Provider initialArg={...} init={...}>`
 */
declare function createContextReducer<S, A, I = S>(reducer: (state: S, action: A) => S): [
    Provider: React.ComponentType<React.PropsWithChildren<Required<{
        initialArg?: I;
        init?: (arg: I) => S;
    }>>>,
    useValue: () => S,
    useDispatch: () => React.Dispatch<A>,
    StateContext: React.Context<S>
];

export { createContextReducer };
