"use client";
import { jsx } from "react/jsx-runtime";
import { createContext, useContext, useMemo } from "react";
const Context = /*#__PURE__*/ createContext({});
const SharedOnChangeContext = ({ children, onChange })=>{
    const sharedOnChangeContext = useMemo(()=>({
            onChange
        }), [
        onChange
    ]);
    return /*#__PURE__*/ jsx(Context.Provider, {
        value: sharedOnChangeContext,
        children: children
    });
};
const useSharedOnChange = ()=>{
    const context = useContext(Context);
    if (void 0 !== context) return context;
    throw new Error('useSharedOnChange must be used within an SharedOnChangeProvider');
};
export { SharedOnChangeContext, useSharedOnChange };
